switchVideo method
- @Deprecated('Use [toggleCameraMuteState]')
- bool isOn = false,
To switch local peer's video on/off.
Pass the bool value to isOn
to change the current video status
Refer switch video guide here.
Implementation
@Deprecated('Use [toggleCameraMuteState]')
Future<HMSException?> switchVideo({bool isOn = false}) async {
bool result = await PlatformService.invokeMethod(PlatformMethod.switchVideo,
arguments: {'is_on': isOn});
if (result) {
return null;
} else {
return HMSException(
message: "Switch Video failed",
description: "Cannot toggle video status",
action: "VIDEO",
params: {'is_on': isOn},
isTerminal: false);
}
}