mirror of
https://github.com/mmjee/Piped-Material.git
synced 2024-12-06 19:26:36 +01:00
Fix LBRY videos
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -50,6 +50,11 @@ export default {
|
||||
type: 'bool',
|
||||
default: false
|
||||
},
|
||||
{
|
||||
id: 'proxyLBRY',
|
||||
type: 'bool',
|
||||
default: true
|
||||
},
|
||||
{
|
||||
id: 'homepage',
|
||||
type: 'select',
|
||||
|
||||
@@ -7,7 +7,8 @@ const PrefsStore = {
|
||||
prefs: {
|
||||
playerAutoplay: true,
|
||||
autoplay: false,
|
||||
listen: false
|
||||
listen: false,
|
||||
proxyLBRY: true
|
||||
}
|
||||
}),
|
||||
mutations: {
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
"enabled_codecs": "Enabled Codecs (Multiple)"
|
||||
},
|
||||
"preferences": {
|
||||
"proxyLBRY": "Proxy LBRY videos",
|
||||
"playerAutoplay": "Autoplay Video",
|
||||
"bufferGoal": "Buffering Goal",
|
||||
"listen": "Audio Only",
|
||||
|
||||
Reference in New Issue
Block a user