Open krisnapy opened 4 months ago
Hi @krisnapy, thanks for sharing issue! We'll try to fix it as fast as possible!
This issue is stale because it has been open for 30 days with no activity. If there won't be any activity in the next 14 days, this issue will be closed automatically.
Sorry for very long answer time. It looks like something easy to fix (1 line):
I think following patch should be enough to fix the issue:
diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift
index 345acbf0..4b002828 100644
--- a/ios/Video/RCTVideo.swift
+++ b/ios/Video/RCTVideo.swift
@@ -753,6 +753,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
@objc
func setMixWithOthers(_ mixWithOthers: String?) {
_mixWithOthers = mixWithOthers
+ RCTPlayerOperations.configureAudio(ignoreSilentSwitch: _ignoreSilentSwitch, mixWithOthers: _mixWithOthers, audioOutput: _audioOutput)
applyModifiers()
}
hum, that is not enough ... If we define only mixWithOther, there is no audio output at all ... @KrzysztofMoch It would be great to integrate this change as part of: https://github.com/TheWidlarzGroup/react-native-video/pull/3850/files I think you already fix the issue I see in your PR, but as I don't have real iphone yet, I cannot test properly ...
I also wonder if configureAudio (or your new function) should be called inside applyModifiers ? but I am not sure ...
Version
6.4.2
What platforms are you having the problem on?
iOS
System Version
iOS 17.5.1
On what device are you experiencing the issue?
Real device
Architecture
Old architecture
What happened?
External audio such as Spotify stops when the video has been played even if I set MixWithOthers to “mix”, but when the audio is played again, the audio does not stop. I thought it would stop when first load/play.
https://github.com/user-attachments/assets/9e3b0def-f1c3-4b23-bd13-c47bad1b04fa
Reproduction
-
Reproduction
Step to reproduce this bug are:
Component:
AppDelegate: