From 7c57c8c2dab0539d3b5154ca6d6b8da3ffe25ed8 Mon Sep 17 00:00:00 2001 From: Justin Wong <46082645+uvjustin@users.noreply.github.com> Date: Wed, 17 Aug 2022 23:28:32 +0800 Subject: [PATCH] Use master playlist for videojs --- web/src/components/HistoryViewer/HistoryVideo.tsx | 2 +- web/src/routes/Events.jsx | 2 +- web/src/routes/Recording.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/components/HistoryViewer/HistoryVideo.tsx b/web/src/components/HistoryViewer/HistoryVideo.tsx index 6a513f29c..329dd3d79 100644 --- a/web/src/components/HistoryViewer/HistoryVideo.tsx +++ b/web/src/components/HistoryViewer/HistoryVideo.tsx @@ -57,7 +57,7 @@ export const HistoryVideo = ({ } video.src({ - src: `${apiHost}/vod/event/${id}/index.m3u8`, + src: `${apiHost}/vod/event/${id}/master.m3u8`, type: 'application/vnd.apple.mpegurl', }); video.poster(`${apiHost}/api/events/${id}/snapshot.jpg`); diff --git a/web/src/routes/Events.jsx b/web/src/routes/Events.jsx index b6c6fa77f..a35ca79d0 100644 --- a/web/src/routes/Events.jsx +++ b/web/src/routes/Events.jsx @@ -504,7 +504,7 @@ export default function Events({ path, ...props }) { autoplay: true, sources: [ { - src: `${apiHost}/vod/event/${event.id}/index.m3u8`, + src: `${apiHost}/vod/event/${event.id}/master.m3u8`, type: 'application/vnd.apple.mpegurl', }, ], diff --git a/web/src/routes/Recording.jsx b/web/src/routes/Recording.jsx index 8f81dde7d..23a888a8f 100644 --- a/web/src/routes/Recording.jsx +++ b/web/src/routes/Recording.jsx @@ -62,7 +62,7 @@ export default function Recording({ camera, date, hour = '00', minute = '00', se description: `${camera} recording @ ${h.hour}:00.`, sources: [ { - src: `${apiHost}/vod/${year}-${month}/${day}/${h.hour}/${camera}/index.m3u8`, + src: `${apiHost}/vod/${year}-${month}/${day}/${h.hour}/${camera}/master.m3u8`, type: 'application/vnd.apple.mpegurl', }, ],