fix(sandbox): use getMuxPosterSrc (#950)

This commit is contained in:
Sam Potts
2026-03-14 10:23:36 +11:00
committed by GitHub
parent e3f438e9f4
commit b82b6dba7a
@@ -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} />;
}