CallBackend.fromJson constructor
Implementation
factory CallBackend.fromJson(Map<String, Object?> json) {
final String type = json['type'] as String;
if (type == 'mesh') {
return MeshBackend(
type: type,
);
} else if (type == 'livekit') {
return LiveKitBackend(
livekitAlias: json['livekit_alias'] as String,
livekitServiceUrl: json['livekit_service_url'] as String,
type: type,
);
} else {
throw MatrixSDKVoipException(
'Invalid type: $type in CallBackend.fromJson');
}
}