diff --git a/src/components/Player.vue b/src/components/Player.vue index 21a30075..ee8af30c 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -44,13 +44,15 @@ export default { if (this.video.livestream) { uri = this.video.hls; - } else { + } else if (this.video.audioStreams.length > 0) { 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 { + uri = this.video.videoStreams[0].url; } if (noPrevPlayer) @@ -132,7 +134,7 @@ export default { ) this.player.configure("manifest.disableVideo", true); - player.load(uri).then(() => { + player.load(uri, 0, uri.indexOf("dash+xml") >= 0 ? "application/dash+xml" : "video/mp4").then(() => { this.video.subtitles.map(subtitle => { player.addTextTrackAsync( subtitle.url,