File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -30,21 +30,18 @@ mpd parser
30
30
npm install --save mpd-parser
31
31
```
32
32
33
- The npm installation is preferred, but Bower works, too.
34
-
35
- ``` sh
36
- bower install --save mpd-parser
37
- ```
38
-
39
33
## Usage
40
34
41
35
``` js
42
- var manifest = [
43
- ' <>' ,
44
- ' <>' ,
45
- ].join (' \n ' );
36
+ // get your manifest in whatever way works best
37
+ // for example, by reading the file from the filesystem in node
38
+ // or using fetch in a browser like so:
46
39
47
- var parsedManifest = mpdParser .parse (manifest, manifestUrl);
40
+ const manifestUri = ' https://example.com/dash.xml' ;
41
+ const res = await fetch (manifestUri);
42
+ const manifest = await res .text ();
43
+
44
+ var parsedManifest = mpdParser .parse (manifest, { manifestUri });
48
45
```
49
46
50
47
### Parsed Output
You can’t perform that action at this time.
0 commit comments