sendVideo method
Starts or stops sending video for the call.
Fot the non-conference video call it stops or starts video send (video stream is removed or added).
For the conference call it mutes or un-mutes video send (video stream in the 'muted' state will still consume a small bandwidth).
enable
- True if video should be sent, false otherwise
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> sendVideo(bool enable) async {
try {
await _channel.invokeMethod('Call.sendVideoForCall', <String, dynamic>{
'callId': _callId,
'enable': enable,
});
} on PlatformException catch (e) {
throw VIException(e.code, e.message);
}
}