setAudioSessionOperationRestriction method

  1. @override
Future<void> setAudioSessionOperationRestriction(
  1. AudioSessionOperationRestriction restriction
)

The SDK and the app can both configure the audio session by default. The app may occasionally use other apps or third-party components to manipulate the audio session and restrict the SDK from doing so. This method allows the app to restrict the SDK’s manipulation of the audio session.

You can call this method at any time to return the control of the audio sessions to the SDK.

Note

  • This method restricts the SDK’s manipulation of the audio session. Any operation to the audio session relies solely on the app, other apps, or third-party components.

Parameter restriction The operational restriction (bit mask) of the SDK on the audio session. See AudioSessionOperationRestriction.

Implementation

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