1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00
Daniel Neto 2023-10-25 10:14:46 -03:00
parent b6d47e94c8
commit 65f15c7e46
2882 changed files with 382239 additions and 10785 deletions

11
node_modules/mpd-parser/README.md generated vendored
View file

@ -41,7 +41,10 @@ const manifestUri = 'https://example.com/dash.xml';
const res = await fetch(manifestUri);
const manifest = await res.text();
var parsedManifest = mpdParser.parse(manifest, { manifestUri });
// A callback function to handle events like errors or warnings
const eventHandler = ({ type, message }) => console.log(`${type}: ${message}`);
var parsedManifest = mpdParser.parse(manifest, { manifestUri, eventHandler });
```
If dealing with a live stream, then on subsequent calls to parse, the previously parsed
@ -63,6 +66,12 @@ The parser ouputs a plain javascript object with the following structure:
```js
Manifest {
allowCache: boolean,
contentSteering: {
defaultServiceLocation: string,
proxyServerURL: string,
queryBeforeStart: boolean,
serverURL: string
},
endList: boolean,
mediaSequence: number,
discontinuitySequence: number,