abbasfreestyle / react-native-af-video-player

MIT License
381 stars 288 forks source link

Video is playing in a background(only in Android). #114

Open binkumar opened 5 years ago

binkumar commented 5 years ago

In an Android before rendering a Video Player view if app goes to background, app still plays the video in the background even though I have assigned two flags i.e. playInBackground and playWhenInactive to false.

But while a playing a video if app goes to background it works fine. Means player pause the video.

surenderkhowal commented 5 years ago
      `<Video
       scrollBounce={true}
       autoPlay={true}
       url={progressive[selectQuality].url}
       ref={(ref) => { this.video = ref }}
      />`

when you navigate on next screen set paused state true

this.video.setState({paused:true})

this.video is ref of player