video: allow setting default quality (fix #364)
parent
1dd1774ed2
commit
0f5162bd68
|
@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue