setAudioSessionOperationRestriction
Sets the operational permission of the SDK on the audio session.
Future<void> setAudioSessionOperationRestriction( AudioSessionOperationRestriction restriction);
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.
Exceptions
When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.