Fix xml-js pollyfills.

This commit is contained in:
FireMasterK
2021-12-29 00:33:15 +00:00
parent b32e868e8f
commit 4289a02e20
4 changed files with 42 additions and 15 deletions

View File

@@ -228,10 +228,9 @@ export default {
mime = "application/x-mpegURL";
} else if (this.video.audioStreams.length > 0 && !lbry && MseSupport) {
if (!this.video.dash) {
const dash = require("@/utils/DashUtils.js").default.generate_dash_file_from_formats(
streams,
this.video.duration,
);
const dash = (
await import("@/utils/DashUtils.js").then(mod => mod.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.dash;