mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
15 lines
330 B
TypeScript
15 lines
330 B
TypeScript
import { Poster } from '@videojs/react';
|
|
|
|
import { getMuxPosterSrc } from '../mux';
|
|
import type { SourceId } from '../sources';
|
|
|
|
type MuxPosterProps = {
|
|
source: SourceId;
|
|
};
|
|
|
|
export function MuxPoster({ source }: MuxPosterProps) {
|
|
const src = getMuxPosterSrc(source);
|
|
if (!src) return null;
|
|
return <Poster src={src} />;
|
|
}
|