mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-25 06:57:22 +00:00
parent
a159ac30dd
commit
546dc6825a
@ -95,7 +95,9 @@ export default {
|
||||
|
||||
const MseSupport = window.MediaSource !== undefined;
|
||||
|
||||
const lbry = this.video.videoStreams.filter(stream => stream.quality === "LBRY")[0];
|
||||
const lbry = this.getPreferenceBoolean("disableLBRY", false)
|
||||
? null
|
||||
: this.video.videoStreams.filter(stream => stream.quality === "LBRY")[0];
|
||||
|
||||
var uri;
|
||||
|
||||
@ -112,6 +114,12 @@ export default {
|
||||
} else uri = this.video.dash;
|
||||
} else if (lbry) {
|
||||
uri = lbry.url;
|
||||
if (this.getPreferenceBoolean("proxyLBRY", false)) {
|
||||
const url = new URL(uri);
|
||||
url.searchParams.set("host", url.host);
|
||||
url.host = new URL(this.video.proxyUrl).host;
|
||||
uri = url.toString();
|
||||
}
|
||||
} else {
|
||||
uri = this.video.videoStreams.filter(stream => stream.codec == null).slice(-1)[0].url;
|
||||
}
|
||||
|
@ -106,6 +106,14 @@
|
||||
<option value="vp9">VP9</option>
|
||||
<option value="avc">AVC (h.264)</option>
|
||||
</select>
|
||||
<br />
|
||||
<b v-t="'actions.disable_lbry'" />
|
||||
<br />
|
||||
<input class="uk-checkbox" v-model="disableLBRY" @change="onChange($event)" type="checkbox" />
|
||||
<br />
|
||||
<b v-t="'actions.enable_lbry_proxy'" />
|
||||
<br />
|
||||
<input class="uk-checkbox" v-model="proxyLBRY" @change="onChange($event)" type="checkbox" />
|
||||
<h2 v-t="'actions.instances_list'" />
|
||||
<table class="uk-table">
|
||||
<thead>
|
||||
@ -181,6 +189,8 @@ export default {
|
||||
{ code: "tr", name: "Turkish" },
|
||||
],
|
||||
enabledCodecs: ["av1", "vp9", "avc"],
|
||||
disableLBRY: false,
|
||||
proxyLBRY: false,
|
||||
};
|
||||
},
|
||||
activated() {
|
||||
@ -267,6 +277,8 @@ export default {
|
||||
this.watchHistory = this.getPreferenceBoolean("watchHistory", false);
|
||||
this.selectedLanguage = this.getPreferenceString("hl", "en");
|
||||
this.enabledCodecs = this.getPreferenceString("enabledCodecs", "av1,vp9,avc").split(",");
|
||||
this.disableLBRY = this.getPreferenceBoolean("disableLBRY", false);
|
||||
this.proxyLBRY = this.getPreferenceBoolean("proxyLBRY", false);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -307,6 +319,8 @@ export default {
|
||||
localStorage.setItem("watchHistory", this.watchHistory);
|
||||
localStorage.setItem("hl", this.selectedLanguage);
|
||||
localStorage.setItem("enabledCodecs", this.enabledCodecs.join(","));
|
||||
localStorage.setItem("disableLBRY", this.disableLBRY);
|
||||
localStorage.setItem("proxyLBRY", this.proxyLBRY);
|
||||
|
||||
if (shouldReload) window.location.reload();
|
||||
}
|
||||
|
@ -44,6 +44,8 @@
|
||||
"store_watch_history": "Store Watch History",
|
||||
"language_selection": "Language Selection",
|
||||
"instances_list": "Instances List",
|
||||
"enabled_codecs": "Enabled Codecs (Multiple)"
|
||||
"enabled_codecs": "Enabled Codecs (Multiple)",
|
||||
"disable_lbry": "Disable LBRY for Streaming",
|
||||
"enable_lbry_proxy": "Enable Proxy for LBRY"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user