Skip to content

Commit f0da2cc

Browse files
authored
docs: update usage example in README (#127)
1 parent 5dde0e9 commit f0da2cc

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,18 @@ mpd parser
3030
npm install --save mpd-parser
3131
```
3232

33-
The npm installation is preferred, but Bower works, too.
34-
35-
```sh
36-
bower install --save mpd-parser
37-
```
38-
3933
## Usage
4034

4135
```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:
4639

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 });
4845
```
4946

5047
### Parsed Output

0 commit comments

Comments
 (0)