[Video] Resume background audio whenever muting video audio (#4915)
This commit is contained in:
parent
c2131bb039
commit
65d6e561d4
6 changed files with 28 additions and 17 deletions
|
@ -9,9 +9,9 @@ export function getIsReducedMotionEnabled(): boolean {
|
|||
return NativeModule.getIsReducedMotionEnabled()
|
||||
}
|
||||
|
||||
export function setAudioMixWithOthers(mixWithOthers: boolean): void {
|
||||
export function setAudioActive(active: boolean): void {
|
||||
if (Platform.OS !== 'ios') return
|
||||
NativeModule.setAudioMixWithOthers(mixWithOthers)
|
||||
NativeModule.setAudioActive(active)
|
||||
}
|
||||
|
||||
export function setAudioCategory(audioCategory: AudioCategory): void {
|
||||
|
|
|
@ -6,11 +6,13 @@ export function getIsReducedMotionEnabled(): boolean {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set whether the app's audio should mix with other apps' audio.
|
||||
* Set whether the app's audio should mix with other apps' audio. Will also resume background music playback when `false`
|
||||
* if it was previously playing.
|
||||
* @param mixWithOthers
|
||||
* @see https://developer.apple.com/documentation/avfaudio/avaudiosession/setactiveoptions/1616603-notifyothersondeactivation
|
||||
*/
|
||||
export function setAudioMixWithOthers(mixWithOthers: boolean): void {
|
||||
throw new NotImplementedError({mixWithOthers})
|
||||
export function setAudioActive(active: boolean): void {
|
||||
throw new NotImplementedError({active})
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,8 +8,8 @@ export function getIsReducedMotionEnabled(): boolean {
|
|||
return window.matchMedia('(prefers-reduced-motion: reduce)').matches
|
||||
}
|
||||
|
||||
export function setAudioMixWithOthers(mixWithOthers: boolean): void {
|
||||
throw new NotImplementedError({mixWithOthers})
|
||||
export function setAudioActive(active: boolean): void {
|
||||
throw new NotImplementedError({active})
|
||||
}
|
||||
|
||||
export function setAudioCategory(audioCategory: AudioCategory): void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue