diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index df9e17d6..fb500503 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -132,6 +132,7 @@ class PageController extends Controller // Video configuration $initialState->provideInitialState('notranscode', $config->getSystemValue('memories.no_transcode', 'UNSET')); + $initialState->provideInitialState('video_default_quality', $config->getSystemValue('memories.video_default_quality', '0')); } /** diff --git a/src/components/viewer/PsVideo.ts b/src/components/viewer/PsVideo.ts index 8196a0bd..812407e4 100644 --- a/src/components/viewer/PsVideo.ts +++ b/src/components/viewer/PsVideo.ts @@ -14,6 +14,10 @@ const config_noTranscode = loadState( "UNSET" ) as boolean | string; +const config_video_default_quality = Number( + loadState("memories", "video_default_quality", "0") as string +); + /** * Check if slide has video content * @@ -309,7 +313,7 @@ class VideoContentSetup { if (qualityNums) { opts.quality = { - default: 0, + default: config_video_default_quality, options: qualityNums, forced: true, onChange: (quality: number) => {