mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-10-14 19:38:18 +00:00
Fix xml-js pollyfills.
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
// Based of https://github.com/GilgusMaximus/yt-dash-manifest-generator/blob/master/src/DashGenerator.js
|
||||
|
||||
const xml = require("xml-js");
|
||||
import { Buffer } from "buffer";
|
||||
window.Buffer = Buffer;
|
||||
import { json2xml } from "xml-js";
|
||||
|
||||
const DashUtils = {
|
||||
generate_dash_file_from_formats(VideoFormats, VideoLength) {
|
||||
const generatedJSON = this.generate_xmljs_json_from_data(VideoFormats, VideoLength);
|
||||
return xml.json2xml(generatedJSON);
|
||||
return json2xml(generatedJSON);
|
||||
},
|
||||
generate_xmljs_json_from_data(VideoFormatArray, VideoLength) {
|
||||
const convertJSON = {
|
||||
|
Reference in New Issue
Block a user