recording method Null safety
record on-going call
state
: true|false, depending on whether you want to start or stop recording something
audio
: true|false; whether or not our audio should be recorded
video
: true|false; whether or not our video should be recorded
peerAudio
: true|false; whether or not our peer's audio should be recorded
peerVideo
: true|false; whether or not our peer's video should be recorded
filename
: base path/filename to use for all the recordings
Implementation
Future<void> recording(
bool state, {
bool? audio,
bool? video,
bool? peerAudio,
bool? peerVideo,
String? filename,
}) async {
var payload = {
"request": "recording",
"action": state ? "start" : 'stop',
"audio": audio,
"video": video,
"peer_audio": peerAudio,
"peer_video": peerVideo,
"filename": filename
}..removeWhere((key, value) => value == null);
JanusEvent response = JanusEvent.fromJson(await this.send(data: payload));
JanusError.throwErrorFromEvent(response);
}