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

Load videos remotely from the network #7

Closed
brianchirls opened this issue Apr 7, 2015 · 5 comments
Closed

Load videos remotely from the network #7

brianchirls opened this issue Apr 7, 2015 · 5 comments

Comments

@brianchirls
Copy link

Right now, this component only works with local videos. AVPlayer works either way; you just have to change how you create the NSURL. Something like this:

- (void)setSrc:(NSString *)source
{
  // ...
  _videoURL = [[NSURL alloc] initWithString:source];
  // ...

I think you'd want to do parse the incoming source string and decide whether to look in the mainBundle. I can try to take a stab at it myself if I have some time later, unless you have a preference as to how this would work.

@brianchirls
Copy link
Author

As an alternative, consider defining the source as an object, to match how Image works.

@brentvatne
Copy link
Contributor

@brianchirls - absolutely would love to do this, just haven't had the time yet - feel free to take a stab at it!

@brianchirls
Copy link
Author

@brentvatne In response to your comment in #8 about adding onLoadStart, it might be worth taking a look at the states and events fired by the HTML video element. They're pretty good about covering a lot of cases. For example, now you have onProgress, which appears to fire when the video progresses. HTML has progress for reporting when new chunks for data are buffered from the network and timeupdate for when the video currentTime changes, whether by playing or seeking, forward or backward. It makes sense because the play head can go forward or backward, whereas buffering typically only makes "progress" and does not get undone.

@johanneslumpe
Copy link
Contributor

#9 addresses this - it's a work in progress though.

@brentvatne
Copy link
Contributor

@brianchirls - looks like this is resolved now, let's take the discussion of how to best handle progress events to #10!

RalfNieuwenhuizen added a commit to RalfNieuwenhuizen/react-native-video that referenced this issue Jan 10, 2020
hueniverse pushed a commit that referenced this issue Jun 9, 2022
Add support for onBufferProgress prop on Android to get buffer data even when the player is paused.
yungblud added a commit to react-native-yeouido/react-native-video that referenced this issue May 8, 2023
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