import { getSrc } from "@livepeer/react/external";
import * as Player from "@livepeer/react/player";
// An example response from the livepeer playback info API endpoint
const vodSource = {
type: "vod",
meta: {
playbackPolicy: null,
source: [
{
hrn: "HLS (TS)",
type: "html5/application/vnd.apple.mpegurl",
url: "https://lp-playback.com/hls/f5eese9wwl88k4g8/index.m3u8",
},
],
},
};
// This is either an array of `Src` or null,
// and can be passed into the Player.Root `src`
const src = getSrc(vodSource);
export default () => (
<Player.Root src={src}>{/* All child components. */}</Player.Root>
);