[Video] More tweaks to AVAudioSession options (#4910)
This commit is contained in:
parent
dd0d50a6f0
commit
5bfe5aa503
8 changed files with 74 additions and 10 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue