mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +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>
|
<summary>Set PlayFlags for playbin</summary>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
|
<!-- YouTube -->
|
||||||
|
<key name="yt-adaptive-enabled" type="b">
|
||||||
|
<default>false</default>
|
||||||
|
<summary>Enable to use adaptive streaming</summary>
|
||||||
|
</key>
|
||||||
|
|
||||||
<!-- Other -->
|
<!-- Other -->
|
||||||
<key name="window-size" type="s">
|
<key name="window-size" type="s">
|
||||||
<default>'[800, 490]'</default>
|
<default>'[800, 490]'</default>
|
||||||
|
@@ -6,6 +6,7 @@ const Misc = imports.src.misc;
|
|||||||
const YTDL = imports.src.assets['node-ytdl-core'];
|
const YTDL = imports.src.assets['node-ytdl-core'];
|
||||||
|
|
||||||
const debug = Debug.ytDebug;
|
const debug = Debug.ytDebug;
|
||||||
|
const { settings } = Misc;
|
||||||
|
|
||||||
const InitAsyncState = {
|
const InitAsyncState = {
|
||||||
NONE: 0,
|
NONE: 0,
|
||||||
@@ -358,7 +359,7 @@ var YouTubeClient = GObject.registerClass({
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
/* TODO: Options in prefs to set preferred video formats and adaptive streaming */
|
/* 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 = {
|
const allowedFormats = {
|
||||||
video: [
|
video: [
|
||||||
133,
|
133,
|
||||||
|
Reference in New Issue
Block a user