Fix LBRY videos

This commit is contained in:
root
2021-11-11 06:43:42 +05:30
parent 85c6722fa3
commit b24eff223c
4 changed files with 16 additions and 5 deletions
+8 -4
View File
@@ -110,12 +110,16 @@ export default {
}
mime = 'application/dash+xml'
} else if (lbry) {
const contentType = await fetch(uri, {
uri = lbry.url
if (this.$store.getters['prefs/getPreferenceBoolean']('proxyLBRY', true)) {
const url = new URL(uri)
url.searchParams.set('host', url.host)
url.host = new URL(this.video.proxyUrl).host
uri = url.toString()
}
mime = await fetch(uri, {
method: 'HEAD'
}).then(response => response.headers.get('Content-Type'))
mime = contentType
uri = lbry.uri
} else if (this.video.hls) {
uri = this.video.hls
mime = 'application/x-mpegURL'
+5
View File
@@ -50,6 +50,11 @@ export default {
type: 'bool',
default: false
},
{
id: 'proxyLBRY',
type: 'bool',
default: true
},
{
id: 'homepage',
type: 'select',
+2 -1
View File
@@ -7,7 +7,8 @@ const PrefsStore = {
prefs: {
playerAutoplay: true,
autoplay: false,
listen: false
listen: false,
proxyLBRY: true
}
}),
mutations: {
+1
View File
@@ -50,6 +50,7 @@
"enabled_codecs": "Enabled Codecs (Multiple)"
},
"preferences": {
"proxyLBRY": "Proxy LBRY videos",
"playerAutoplay": "Autoplay Video",
"bufferGoal": "Buffering Goal",
"listen": "Audio Only",