···44export const csr = true;
5566export const load: PageLoad = async ({ params }) => {
77- const CDN_URL = `https://video.cdn.bsky.app`;
88- const BASE_URL = `${CDN_URL}/hls/${params.actor}/${params.cid}`;
99-107 return {
1111- playlistUrl: `${BASE_URL}/playlist.m3u8`,
1212- thumbnailUrl: `${BASE_URL}/thumbnail.jpg`,
88+ // Ideally we should just be using `video.cdn.bsky.app` here for the playlist,
99+ // the problem is that the original M3U8 playlist stored by the CDN doesn't contain
1010+ // the caption definitions, they're added in by the middleware service.
1111+ //
1212+ // We'll replace the subsequent playlist and segment URLs when setting up the player.
1313+ playlistUrl: `https://video.bsky.app/watch/${params.actor}/${params.cid}/playlist.m3u8`,
1414+ thumbnailUrl: `https://video.cdn.bsky.app/hls/${params.actor}/${params.cid}/thumbnail.jpg`,
1315 };
1416};