Add progressive video download option

Buffer download whole network video during playback to allow fast seeking for online media. Can be disabled in prefs (enabled by default).
This commit is contained in:
Rafostar
2020-12-08 20:31:45 +01:00
parent 6ea210ff12
commit 8dfede27ac
5 changed files with 69 additions and 13 deletions

View File

@@ -88,6 +88,7 @@ class ClapperPlayerBase extends GstPlayer.Player
'seeking-mode',
'audio-offset',
'subtitle-offset',
'play-flags',
];
for(let key of settingsToSet)
@@ -256,6 +257,16 @@ class ClapperPlayerBase extends GstPlayer.Player
root[action + '_css_class'](brightClass);
debug(`${action} brighter sliders`);
break;
case 'play-flags':
const initialFlags = this.pipeline.flags;
const settingsFlags = settings.get_int(key);
if(initialFlags === settingsFlags)
break;
this.pipeline.flags = settingsFlags;
debug(`changed play flags: ${initialFlags} -> ${settingsFlags}`);
break;
default:
break;
}