[Video] More tweaks to AVAudioSession options (#4910)

This commit is contained in:
Hailey 2024-08-09 14:35:26 -07:00 committed by GitHub
parent dd0d50a6f0
commit 5bfe5aa503
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 74 additions and 10 deletions

View file

@ -1,6 +1,8 @@
import {Platform} from 'react-native'
import {requireNativeModule} from 'expo-modules-core'
import {AudioCategory} from './types'
const NativeModule = requireNativeModule('ExpoPlatformInfo')
export function getIsReducedMotionEnabled(): boolean {
@ -11,3 +13,8 @@ export function setAudioMixWithOthers(mixWithOthers: boolean): void {
if (Platform.OS !== 'ios') return
NativeModule.setAudioMixWithOthers(mixWithOthers)
}
export function setAudioCategory(audioCategory: AudioCategory): void {
if (Platform.OS !== 'ios') return
NativeModule.setAudioCategory(audioCategory)
}