forked from Github/frigate
Optimize nginx & recordings (#4688)
* Add segment duration metadata * Use faststart only for kept segments * Add more options for performance * Build nginx locally * Build nginx in dockerfile and enable threaded vod handling * Use DASH instead of hls * Allow player to continue on error * Undo DASH change * Fix typo * Correct log * Fix bad comments * Fix indentation * Preload stream * remove unused * Fix spacing * Fix tabs / sspaces * Retab * More cleanup
This commit is contained in:
@@ -33,6 +33,9 @@ export default function VideoPlayer({ children, options, seekOptions = {}, onRea
|
||||
...seekOptions,
|
||||
});
|
||||
|
||||
// Allows player to continue on error
|
||||
player.reloadSourceOnError();
|
||||
|
||||
// Disable fullscreen on iOS if we have children
|
||||
if (
|
||||
children &&
|
||||
|
||||
@@ -561,7 +561,7 @@ export default function Events({ path, ...props }) {
|
||||
autoplay: true,
|
||||
sources: [
|
||||
{
|
||||
src: `${apiHost}/vod/event/${event.id}/master.m3u8`,
|
||||
src: `${apiHost}vod/event/${event.id}/master.m3u8`,
|
||||
type: 'application/vnd.apple.mpegurl',
|
||||
},
|
||||
],
|
||||
|
||||
@@ -69,7 +69,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}/${timezone.replaceAll(
|
||||
src: `${apiHost}vod/${year}-${month}/${day}/${h.hour}/${camera}/${timezone.replaceAll(
|
||||
'/',
|
||||
'_'
|
||||
)}/master.m3u8`,
|
||||
@@ -135,6 +135,9 @@ export default function Recording({ camera, date, hour = '00', minute = '00', se
|
||||
<div className="text-xs">Dates and times are based on the browser's timezone {timezone}</div>
|
||||
|
||||
<VideoPlayer
|
||||
options={{
|
||||
preload: 'auto',
|
||||
}}
|
||||
onReady={(player) => {
|
||||
player.on('ratechange', () => player.defaultPlaybackRate(player.playbackRate()));
|
||||
if (player.playlist) {
|
||||
|
||||
Reference in New Issue
Block a user