File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -117,9 +117,7 @@ export async function activateAudioSession(
117117 }
118118) : Promise < void > {
119119 if ( ! isAndroid ) {
120- return VolumeManagerNativeModule . activateAudioSession (
121- options . runAsync
122- ) ;
120+ return VolumeManagerNativeModule . activateAudioSession ( options . runAsync ) ;
123121 }
124122 return undefined ;
125123}
@@ -130,7 +128,10 @@ export async function activateAudioSession(
130128 * @returns {Promise<void> } - Resolves when the operation has finished. If an error occurs, it will be rejected with an instance of Error. On Android, this function returns undefined.
131129 */
132130export async function deactivateAudioSession (
133- options : AVAudioSessionDeactivationOptions = { runAsync : true }
131+ options : AVAudioSessionDeactivationOptions = {
132+ restorePreviousSessionOnDeactivation : true ,
133+ runAsync : true ,
134+ }
134135) : Promise < void > {
135136 if ( ! isAndroid ) {
136137 return VolumeManagerNativeModule . deactivateAudioSession (
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export type AVAudioSessionActivationOptions = {
3333 * Run the function asyncronously (non blocking).
3434 * @default true
3535 */
36- runAsync ? : boolean ;
36+ runAsync : boolean ;
3737} ;
3838
3939export type AVAudioSessionDeactivationOptions = {
@@ -42,12 +42,12 @@ export type AVAudioSessionDeactivationOptions = {
4242 * and this audio session starts, it will pause the music. When you call `inactivateAudioSession` it will play the music again.
4343 * @default true
4444 */
45- restorePreviousSessionOnDeactivation ? : boolean ;
45+ restorePreviousSessionOnDeactivation : boolean ;
4646 /**
4747 * Run the function asyncronously (non blocking).
4848 * @default true
4949 */
50- runAsync ? : boolean ;
50+ runAsync : boolean ;
5151} ;
5252
5353export enum AVAudioSessionCategory {
You can’t perform that action at this time.
0 commit comments