ios_initAudioPlaybackDeviceForTest method
@platform ios
@detail api
@author dixing
@brief Try to initialize the audio playback device for device test.
@param deviceID Device ID
@return Device status error code:
- 0: Status normal.
- -1: Test not executed.
- -2: Init failed due to lack of permission.
- -3: The device does not exist. No device or device removed.
- -4: The audio format is not supported.
- -5: Error for other reasons
@note
- Call this API before the user joins the room.
- You may still fail to enable the device even you passed the test. Occupation by other application or shortage of CPU / memory may cause the failure.
Implementation
Future<int?> ios_initAudioPlaybackDeviceForTest(string deviceID) async {
$() => ($instance as $p_i.ByteRTCAudioDeviceManager)
.initAudioPlaybackDeviceForTest(deviceID);
if (Platform.isIOS) {
return $();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}