Tracking de l'application VApp (IHM du jeu)

This commit is contained in:
2025-05-11 18:04:12 +02:00
commit 89e9db9b62
17763 changed files with 3718499 additions and 0 deletions

27
VApp/node_modules/mpd-parser/src/stringToMpdXml.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
import {DOMParser} from '@xmldom/xmldom';
import errors from './errors';
export const stringToMpdXml = (manifestString) => {
if (manifestString === '') {
throw new Error(errors.DASH_EMPTY_MANIFEST);
}
const parser = new DOMParser();
let xml;
let mpd;
try {
xml = parser.parseFromString(manifestString, 'application/xml');
mpd = xml && xml.documentElement.tagName === 'MPD' ?
xml.documentElement : null;
} catch (e) {
// ie 11 throws on invalid xml
}
if (!mpd || mpd &&
mpd.getElementsByTagName('parsererror').length > 0) {
throw new Error(errors.DASH_INVALID_XML);
}
return mpd;
};