receiveVideo method
Starts to receive video if video receive was disabled before.
Stop receiving video during the call is not supported.
Throws VIException, if an error occurred.
Errors:
- VICallError.ERROR_REJECTED - If the operation is rejected.
- VICallError.ERROR_ALREADY_IN_THIS_STATE - If the call is already in the requested state.
- VICallError.ERROR_INCORRECT_OPERATION - If the call is not connected.
- VICallError.ERROR_INTERNAL - If an internal error occurred.
- VICallError.ERROR_TIMEOUT - If the operation is not completed in time.
- VICallError.ERROR_MISSING_PERMISSION - Android only. If CAMERA permission is not granted.
- VICallError.ERROR_MEDIA_IS_ON_HOLD - If the call is currently on hold. Put the call off hold and repeat the operation.
- VICallError.ERROR_RECONNECTING - If the call is currently reconnecting.
Implementation
Future<void> receiveVideo() async {
try {
await _channel.invokeMethod('Call.receiveVideoForCall', <String, String>{
'callId': callId,
});
} on PlatformException catch (e) {
throw VIException(e.code, e.message);
}
}