Add limited support for devices without MSE extensions. (#251)

This commit is contained in:
FireMasterK 2021-07-08 01:04:46 +05:30 committed by GitHub
parent b0d9145e75
commit d77ab806e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,11 +55,13 @@ export default {
streams.push(...this.video.audioStreams);
streams.push(...this.video.videoStreams);
const MseSupport = window.MediaSource !== undefined;
var uri;
if (this.video.livestream) {
uri = this.video.hls;
} else if (this.video.audioStreams.length > 0) {
} else if (this.video.audioStreams.length > 0 && MseSupport) {
const dash = require("@/utils/DashUtils.js").default.generate_dash_file_from_formats(
streams,
this.video.duration,
@ -67,7 +69,7 @@ export default {
uri = "data:application/dash+xml;charset=utf-8;base64," + btoa(dash);
} else {
uri = this.video.videoStreams[0].url;
uri = this.video.videoStreams.filter(stream => stream.codec == null)[0].url;
}
if (noPrevPlayer)