mirror of
https://github.com/zoriya/v10.git
synced 2026-08-14 09:59:44 +00:00
fix(sandbox): use getMuxPosterSrc (#950)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Poster } from '@videojs/react';
|
||||
|
||||
import { getMuxAssetId } from '../mux';
|
||||
import { getMuxPosterSrc } from '../mux';
|
||||
import type { SourceId } from '../sources';
|
||||
|
||||
type MuxPosterProps = {
|
||||
@@ -8,7 +8,7 @@ type MuxPosterProps = {
|
||||
};
|
||||
|
||||
export function MuxPoster({ source }: MuxPosterProps) {
|
||||
const id = getMuxAssetId(source);
|
||||
if (!id) return null;
|
||||
return <Poster src={`https://image.mux.com/${id}/thumbnail.jpg`} />;
|
||||
const src = getMuxPosterSrc(source);
|
||||
if (!src) return null;
|
||||
return <Poster src={src} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user