Fix LBRY playback.

This commit is contained in:
Kavin 2023-02-27 11:55:07 +00:00
parent ce3b7aebc6
commit c84d6d333d
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -273,7 +273,7 @@ export default {
const lbry = this.getPreferenceBoolean("disableLBRY", false) const lbry = this.getPreferenceBoolean("disableLBRY", false)
? null ? null
: this.video.videoStreams.filter(stream => stream.quality === "LBRY")[0]; : this.video.videoStreams.filter(stream => stream.quality.indexOf("LBRY") !== -1)[0];
var uri; var uri;
var mime; var mime;
@ -310,13 +310,7 @@ export default {
url.pathname = proxyPath + url.pathname; url.pathname = proxyPath + url.pathname;
uri = url.toString(); uri = url.toString();
} }
const contentType = await fetch(uri, { mime = lbry.mimeType;
method: "HEAD",
}).then(response => {
uri = response.url;
return response.headers.get("Content-Type");
});
mime = contentType;
} else if (this.video.hls) { } else if (this.video.hls) {
uri = this.video.hls; uri = this.video.hls;
mime = "application/x-mpegURL"; mime = "application/x-mpegURL";