mpd-parser
mpd-parser copied to clipboard
Usage in react-native
Hello , i want to ask you how can i implement this in react-native ? i mean i did implement it , but the "manifest" part is really confusing to me , can you clarify it a bit pls ? an example would be wonderful !
Unfortunately, I'm not too sure how react-native runs. mpd-parser is javascript project that when given the XML of an MPEG-DASH manifest will return a JSON representation of it. If react-native works with regular javascript, you should be able to include it. However, it's likely that you don't want mpd-parser itself but probably want to look at a full-fledged video player (like Video.js itself). However, you'll want to find a player that supports react-native. I believe Video.js won't work due to how react-native works, but I'm not positive.
Hey , i still can't fix my problem , my question is that you use 2 parameters in your function, i'm talking about manifest and manifesturl , what's the point of manifest ? if adding only manifesturl will give me the output that i want.
@AnassHmida @gkatsev yeah I think the 'usage' section of readme may be wrong.
the module seems to export function parse(manifestString, options) {
yet the usage says parse(manifest, manifestURL)
Yup, looks like it was changed at one point and the example and docs never got updated.
Here's an example usage: https://github.com/videojs/http-streaming/blob/0976212d8c447b80904a8d1b5f8323579b875be2/src/dash-playlist-loader.js#L41-L45
I think passing the manifestUri
as part of the options object is important.