setAudioSessionOperationRestriction method Null safety

Future<void> setAudioSessionOperationRestriction(
  1. AudioSessionOperationRestriction restriction
)

Sets the operational permission of the SDK on the audio session. (iOS only)

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.

Parameter 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.

Note This method does not restrict the operational permission of the app on the audio session.

Implementation

@override
Future<void> setAudioSessionOperationRestriction(
    AudioSessionOperationRestriction restriction) {
  return _invokeMethod('setAudioSessionOperationRestriction', {
    'restriction':
        AudioSessionOperationRestrictionConverter(restriction).value(),
  });
}