-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Video] More tweaks to
AVAudioSession
options (#4910)
- Loading branch information
Showing
8 changed files
with
74 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import * as PlatformInfo from './src/PlatformInfo' | ||
import {AudioCategory} from './src/PlatformInfo/types' | ||
import * as Referrer from './src/Referrer' | ||
import * as SharedPrefs from './src/SharedPrefs' | ||
import VisibilityView from './src/VisibilityView' | ||
|
||
export {PlatformInfo, Referrer, SharedPrefs, VisibilityView} | ||
export {AudioCategory, PlatformInfo, Referrer, SharedPrefs, VisibilityView} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
import {NotImplementedError} from '../NotImplemented' | ||
import {AudioCategory} from './types' | ||
|
||
export function getIsReducedMotionEnabled(): boolean { | ||
throw new NotImplementedError() | ||
} | ||
|
||
/** | ||
* Set whether the app's audio should mix with other apps' audio. | ||
* @param mixWithOthers | ||
*/ | ||
export function setAudioMixWithOthers(mixWithOthers: boolean): void { | ||
throw new NotImplementedError({mixWithOthers}) | ||
} | ||
|
||
/** | ||
* Set the audio category for the app. | ||
* @param audioCategory | ||
* @platform ios | ||
*/ | ||
export function setAudioCategory(audioCategory: AudioCategory): void { | ||
throw new NotImplementedError({audioCategory}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Sets the audio session category on iOS. In general, we should only need to use this for the `playback` and `ambient` | ||
* categories. This enum however includes other categories that are available in the native API for clarity and | ||
* potential future use. | ||
* @see https://developer.apple.com/documentation/avfoundation/avaudiosession/category | ||
* @platform ios | ||
*/ | ||
export enum AudioCategory { | ||
Ambient = 'AVAudioSessionCategoryAmbient', | ||
Playback = 'AVAudioSessionCategoryPlayback', | ||
_SoloAmbient = 'AVAudioSessionCategorySoloAmbient', | ||
_Record = 'AVAudioSessionCategoryRecord', | ||
_PlayAndRecord = 'AVAudioSessionCategoryPlayAndRecord', | ||
_MultiRoute = 'AVAudioSessionCategoryMultiRoute', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters