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

autoplay and paused props not working in Android #608

Closed
Symous opened this issue May 10, 2017 · 6 comments
Closed

autoplay and paused props not working in Android #608

Symous opened this issue May 10, 2017 · 6 comments

Comments

@Symous
Copy link

Symous commented May 10, 2017

I want to control the video playing status manually,but even I set autopaly={true} and paused={true} it still play automatically.I also had try chenge a playing state in onLoad method,but still not working.

@ranjitpandit
Copy link

I'm seeing the same issue on Android. As soon as the Video component is rendered it starts playing the video even if rate=0 and paused=true.
It works correctly on IOS.

Any ideas?

@maboelsoud
Copy link

Same here. However, if there is something externally that changes the paused property from false to to true, it works. However, it always starts playing, no matter what I do.

Does anyone know the reason for this?

@heartAndRain
Copy link

Same here on Android 5.0

@Symous
Copy link
Author

Symous commented May 19, 2017

@ranjitpandit @Mohamed-Abo-El-Soud @heartAndRain
Hi, guys , I have found why this happened.This is the PR #625 to fix this problem. the author hasn't merge that. so you can have a look at it and modify the native code. :-)

now we can use pause={true} to make the video stop in the beginning.

@cobarx
Copy link
Contributor

cobarx commented Jun 23, 2018

Fixed by #1082. In my testing everything is working properly now. Will be released in 3.0. There isn't an autoPlay prop, but if you don't specify a paused prop, it will auto-play.

@cobarx cobarx closed this as completed Jun 23, 2018
@kumarutsav111
Copy link

set paused={true} inside video props.
<Video
{...videoProps}
ref={(r) => { this.player = r; }}
source={{ uri: currentMessage.video }}
// style={videoStyle}
style = {{
aspectRatio: 1,
width: "90%"
}}
resizeMode="cover"
// onBuffer={this.onBuffer}
// onLoadStart={this.onLoadStart}
//onLoad={this.onLoad}
fullscreenAutorotate = "landscape"
allowsExternalPlayback ={true}
controls = {true}
fullscreen = {true}
paused = {true}
// fullscreenAutorotate={true}
// resizeMode="contain"
/>

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

6 participants