[BUG]: Unmounting the Video component will also stop AVPlayer playing #4486
Replies: 6 comments 7 replies
-
Previous bot comment (click to expand)Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
There is a newer version of the library available. You are using version 6.9.1, while the latest stable version is 6.11.0. Please update to the latest version and check if the issue still exists.
|
Beta Was this translation helpful? Give feedback.
-
Previous bot comment (click to expand)Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
There is a newer version of the library available. You are using version 6.9.1, while the latest stable version is 6.11.0. Please update to the latest version and check if the issue still exists.
|
Beta Was this translation helpful? Give feedback.
-
Previous bot comment (click to expand)Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
There is a newer version of the library available. You are using version 6.9.1, while the latest stable version is 6.11.0. Please update to the latest version and check if the issue still exists.
|
Beta Was this translation helpful? Give feedback.
-
Previous bot comment (click to expand)Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
There is a newer version of the library available. You are using version 6.9.1, while the latest stable version is 6.11.0. Please update to the latest version and check if the issue still exists.
|
Beta Was this translation helpful? Give feedback.
-
Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
There is a newer version of the library available. You are using version 6.9.1, while the latest stable version is 6.11.0. Please update to the latest version and check if the issue still exists.
|
Beta Was this translation helpful? Give feedback.
-
Hello, you should put it outside of you screen stack. This is the current expected behavior, if the component is unmounted, the playback stops (else we cannot control it anymore) |
Beta Was this translation helpful? Give feedback.
-
Version
6.9.1
What platforms are you having the problem on?
iOS
System Version
18.3
On what device are you experiencing the issue?
Real device
Architecture
Old architecture
What happened?
In my app, I have music playing using react-native-sound-player (AVPlayer).
I can play a video using react-native-video while the music continues to play in the background.
However, whenever I close unmount the video component (pop the page where the video resides) the music which is on a parent page also stops.
How do I prevent unmounting react-native-video from stopping AVPlayer from stopping as well?
Reproduction Link
repository link
Reproduction
AppDelegate.m contains the sound settings:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];
The component code for the Video:
`const floatingVideo = React.useCallback(() => {
return (
showVideoPlayer ?
source={require('../Images/loading_logo_silent.mp4')}
style={styles.video}
resizeMode="contain"
paused={false}
mixWithOthers={'mix'}
disableFocus={true}
ignoreSilentSwitch="ignore"
: null
)
}, [showVideoPlayer])`
When setShowVideoPlayer(false), the component disappears, and the music from SoundPlayer, which resides in a parent component/page, also stops playing.
Beta Was this translation helpful? Give feedback.
All reactions