Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage in react-native #107

Open
AnassHmida opened this issue Oct 6, 2020 · 4 comments
Open

Usage in react-native #107

AnassHmida opened this issue Oct 6, 2020 · 4 comments

Comments

@AnassHmida
Copy link

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 !

@gkatsev
Copy link
Member

gkatsev commented Oct 11, 2020

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.

@AnassHmida
Copy link
Author

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.

@AwokeKnowing
Copy link

@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)

@gkatsev
Copy link
Member

gkatsev commented Dec 11, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants