mirror of
https://github.com/zoriya/react-native-video.git
synced 2026-06-03 11:16:02 +00:00
fix(ios): fixed audio focus change on iOS (#4811)
* fix: fixed audio focus change on ios * Fix formatting for audio session category options --------- Co-authored-by: Kamil Moskała <91079590+moskalakamil@users.noreply.github.com>
This commit is contained in:
@@ -195,16 +195,18 @@ class VideoManager {
|
|||||||
|
|
||||||
let audioMixingMode = determineAudioMixingMode()
|
let audioMixingMode = determineAudioMixingMode()
|
||||||
|
|
||||||
|
|
||||||
|
audioSessionCategoryOptions.remove(.duckOthers)
|
||||||
|
audioSessionCategoryOptions.remove(.mixWithOthers)
|
||||||
|
|
||||||
switch audioMixingMode {
|
switch audioMixingMode {
|
||||||
case .mixwithothers:
|
case .mixwithothers:
|
||||||
audioSessionCategoryOptions.insert(.mixWithOthers)
|
audioSessionCategoryOptions.insert(.mixWithOthers)
|
||||||
case .donotmix:
|
|
||||||
audioSessionCategoryOptions.remove(.mixWithOthers)
|
|
||||||
case .duckothers:
|
case .duckothers:
|
||||||
audioSessionCategoryOptions.insert(.duckOthers)
|
audioSessionCategoryOptions.insert(.duckOthers)
|
||||||
case .auto:
|
case .auto, .donotmix:
|
||||||
audioSessionCategoryOptions.remove(.mixWithOthers)
|
// Do nothing as we already cleared the options
|
||||||
audioSessionCategoryOptions.remove(.duckOthers)
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|||||||
Reference in New Issue
Block a user