[Videos] Add iOS function to set AVAudioSession.CategoryOptions to .mixWithOthers (#4905)

* audio mixing pref

* lint
This commit is contained in:
Hailey
2024-08-09 03:05:12 -07:00
committed by GitHub
parent a4f0c9c753
commit cb574b7be3
4 changed files with 26 additions and 0 deletions
@@ -1,3 +1,4 @@
import {Platform} from 'react-native'
import {requireNativeModule} from 'expo-modules-core'
const NativeModule = requireNativeModule('ExpoPlatformInfo')
@@ -5,3 +6,8 @@ const NativeModule = requireNativeModule('ExpoPlatformInfo')
export function getIsReducedMotionEnabled(): boolean {
return NativeModule.getIsReducedMotionEnabled()
}
export function setAudioMixWithOthers(mixWithOthers: boolean): void {
if (Platform.OS !== 'ios') return
NativeModule.setAudioMixWithOthers(mixWithOthers)
}