mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 15:22:11 +02:00
Add setting to enable YouTube adaptive streaming
For now hidden because other related YouTube settings like min/max resolution, codecs etc. are not done yet
This commit is contained in:
@@ -99,6 +99,12 @@
|
||||
<summary>Set PlayFlags for playbin</summary>
|
||||
</key>
|
||||
|
||||
<!-- YouTube -->
|
||||
<key name="yt-adaptive-enabled" type="b">
|
||||
<default>false</default>
|
||||
<summary>Enable to use adaptive streaming</summary>
|
||||
</key>
|
||||
|
||||
<!-- Other -->
|
||||
<key name="window-size" type="s">
|
||||
<default>'[800, 490]'</default>
|
||||
|
@@ -6,6 +6,7 @@ const Misc = imports.src.misc;
|
||||
const YTDL = imports.src.assets['node-ytdl-core'];
|
||||
|
||||
const debug = Debug.ytDebug;
|
||||
const { settings } = Misc;
|
||||
|
||||
const InitAsyncState = {
|
||||
NONE: 0,
|
||||
@@ -358,7 +359,7 @@ var YouTubeClient = GObject.registerClass({
|
||||
return null;
|
||||
|
||||
/* TODO: Options in prefs to set preferred video formats and adaptive streaming */
|
||||
const isAdaptiveEnabled = false;
|
||||
const isAdaptiveEnabled = settings.get_boolean('yt-adaptive-enabled');
|
||||
const allowedFormats = {
|
||||
video: [
|
||||
133,
|
||||
|
Reference in New Issue
Block a user