video: allow setting default quality (fix #364)

pull/391/head
Varun Patil 2023-01-31 20:15:16 -08:00
parent 1dd1774ed2
commit 0f5162bd68
2 changed files with 6 additions and 1 deletions

View File

@ -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'));
}
/**

View File

@ -14,6 +14,10 @@ const config_noTranscode = loadState(
<string>"UNSET"
) as boolean | string;
const config_video_default_quality = Number(
loadState("memories", "video_default_quality", <string>"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) => {