setAudioSessionOperationRestriction

Sets the operational permission of the SDK on the audio session.

abstract setAudioSessionOperationRestriction(
    restriction: AudioSessionOperationRestriction
  ): number;

Details

The SDK and the app can both configure the audio session by default. If you need to only use the app to configure the audio session, this method restricts the operational permission of the SDK on the audio session.

You can call this method either before or after joining a channel. Once you call this method to restrict the operational permission of the SDK on the audio session, the restriction takes effect when the SDK needs to change the audio session.

Attention:
  • This method is only available for iOS platforms.
  • This method does not restrict the operational permission of the app on the audio session.

Parameters

restriction
The operational permission of the SDK on the audio session. See AudioSessionOperationRestriction. This parameter is in bit mask format, and each bit corresponds to a permission.

Returns

  • 0: Success.
  • < 0: Failure.