Fix playback of LBRY streams.

This commit is contained in:
FireMasterK 2021-07-28 13:32:23 +05:30
parent c1a2aef8e3
commit 44607bf429
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD

View File

@ -71,17 +71,21 @@ export default {
const MseSupport = window.MediaSource !== undefined;
const lbry = this.video.videoStreams.filter(stream => stream.quality === "LBRY")[0];
var uri;
if (this.video.livestream) {
uri = this.video.hls;
} else if (this.video.audioStreams.length > 0 && MseSupport) {
} else if (this.video.audioStreams.length > 0 && !lbry && MseSupport) {
const dash = require("@/utils/DashUtils.js").default.generate_dash_file_from_formats(
streams,
this.video.duration,
);
uri = "data:application/dash+xml;charset=utf-8;base64," + btoa(dash);
} else if (lbry) {
uri = lbry.url;
} else {
uri = this.video.videoStreams.filter(stream => stream.codec == null).slice(-1)[0].url;
}