···11import type { PageLoad } from './$types';
2233+import { base } from '$app/paths';
44+35export const ssr = false;
46export const csr = true;
5768export const load: PageLoad = async ({ params }) => {
79 return {
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`,
1010+ // served by our `/_hls/` proxy route — see +server.ts there for why
1111+ // we can't just point at `video.cdn.bsky.app` directly
1212+ playlistUrl: `${base}/_hls/${params.actor}/${params.cid}/playlist.m3u8`,
1413 thumbnailUrl: `https://video.cdn.bsky.app/hls/${params.actor}/${params.cid}/thumbnail.jpg`,
1514 };
1615};