setVideoEnabled method
Implementation
@override
void setVideoEnabled(bool enabled) {
if (CallType.VIDEO_CALL != callType) {
log("Can't perform operation [setVideoEnabled] for AUDIO call");
return;
}
if (localStream == null) {
log("Can't perform operation [setVideoEnabled], cause 'localStream' not initialised");
return;
}
final videoTrack = localStream!
.getVideoTracks()
.firstWhere((track) => track.kind == 'video');
videoTrack.enabled = enabled;
}