-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Android video plays on load regardless of paused flag (device/release only) #494
Comments
I confirm this. Having the same issue. For me the video is playing even in debug mode in the simulator. |
I found out the same issue, Videos play regardless of paused and of rate={0} |
Same problem. |
Same issue as: #484 Workaround, change the state on video load:
Component:
|
ROOT CAUSE SOLUTION
|
I can confirm that @devmaster72 solution works. Is there a pull-request already, or should I create one? Thank you! |
I have the same issue as well, solved using @davidjeffries solution to avoid initial paused flag problem. But I have a similar problem when my app goes to background and then becomes active again, the video plays despite being paused previously (with the paused prop being true based on state). My state doesn't change. Looks like it's related but not sure. |
@xavieramoros, I tested that scenario in my app. Setting the paused prop in the onLoad does not address the root cause of the problem and leaves you exposed to the issue when you background the app and then foreground it. The issue is the one that I was referring in my previous post above. If you use what @gorjanz has committed yesterday all the issues will go away (make sure you remove the setting of the paused prop in the onLoad. Just set the paused prop of the video component to whatever you want it to be) |
Thanks @devmaster72 , I tested @gorjanz fix (9ce1f4b), both cases (background/foreground and initial props) work as expected. My problem now is that I'm using android-exoplayer to avoid the issue of blocking UI while video is loading: #451, which is even worse. Not sure how to have both problem fixed. |
@xavieramoros - Are you saying this fix doesn't work when using exoplayer? |
Sorry for the misunderstanding and late reply @duhseekoh, I was just mentioning that there was still another issue, related to the UI being blocked while loading the video #451. ExoPlayer probably doesn't need this fix. |
Can anyone please tell me, Is this solution will work on exo-player too? |
using
1.0.0
I have the following in JS:
in debug, this works as expected - user sees first frame of video, and video is paused. In release (on a Samsung S6), the video plays.
I added a log statement to ReactVideoView:
and am seeing that message in LogCat.
The text was updated successfully, but these errors were encountered: