abbasfreestyle/react-native-af-video-player

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

Opened this issue · 1 comments

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.

  • [0.2.1 ] react-native-af-video-player version:
  • [0.57.7 ] React Native version:
  • [10.13.6 ] MacOS:
      `<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