TheWidlarzGroup / react-native-video

A <Video /> component for react-native
https://docs.thewidlarzgroup.com/react-native-video/
MIT License
7.23k stars 2.9k forks source link

I want to stop playing the current media when using another media app. #1608

Closed wsupajirakit closed 2 years ago

wsupajirakit commented 5 years ago

I want to stop playing the current media when using another media app.

ex. My App current Play and when open Youtube and play some vdo on youtube I want to stop my App and Play only Youtube (but it's play both app)

iOS it's stop my app when play Youtube But Android it's not

             <Video
             volume={this.state.volume}
             paused={this.state.paused}
             ref={(ref) => { this.video = ref }}
             source={{ uri : this.state.url  }}
             playInBackground={true}
             playWhenInactive={true}
             shouldPlay
             ignoreSilentSwitch={"ignore"} 
             resizeMode="cover"
             style={{width: 1, height: 1}}
             />
CHaNGeTe commented 5 years ago

Are you using the prop playInBackground on purpose?

Adamcrg commented 4 years ago

Are you using the prop playInBackground on purpose?

I have the same question asking for help. I used playInBackground={false}