File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ export type AudioEngineConfigurationState = {
1111 preferSpeakerOutput : boolean ;
1212} ;
1313
14+ const kAudioEngineErrorFailedToConfigureAudioSession = - 4100 ;
15+
1416type CleanupFn = ( ) => void ;
1517
1618/**
@@ -84,7 +86,10 @@ export function setupIOSAudioManagement(
8486 await tryConfigure ( newState , oldState ) ;
8587 } catch ( error ) {
8688 log . error ( 'AudioSession configuration failed, stopping audio engine:' , error ) ;
87- throw error ;
89+ // Throw the error code so the native AudioDeviceModuleObserver returns it
90+ // to the WebRTC engine, which will stop/rollback the operation.
91+ // eslint-disable-next-line no-throw-literal
92+ throw kAudioEngineErrorFailedToConfigureAudioSession ;
8893 }
8994 // Update the audio state only if configure succeeds
9095 audioEngineState = newState ;
You can’t perform that action at this time.
0 commit comments