sendSDPStreamMetadataChanged method
Send SdpStreamMetadata Changed event.
This MSC also adds a new call event m.call.sdp_stream_metadata_changed, which has the common VoIP fields as specified in MSC2746 (version, call_id, party_id) and a sdp_stream_metadata object which is the same thing as sdp_stream_metadata in m.call.negotiate, m.call.invite and m.call.answer. The client sends this event the when sdp_stream_metadata has changed but no negotiation is required (e.g. the user mutes their camera/microphone).
callId
The ID of the call this event relates to.
version
is the version of the VoIP specification this message adheres to. This specification is version 1.
party_id
The party ID for call, Can be set to client.deviceId.
metadata
The sdp_stream_metadata object.
Implementation
Future<String?> sendSDPStreamMetadataChanged(
Room room, String callId, String party_id, SDPStreamMetadata metadata,
{String version = voipProtoVersion, String? txid}) async {
txid ??= 'txid${DateTime.now().millisecondsSinceEpoch}';
final content = {
'call_id': callId,
'party_id': party_id,
if (groupCallId != null) 'conf_id': groupCallId,
'version': version,
sdpStreamMetadataKey: metadata.toJson(),
};
return await _sendContent(
room,
EventTypes.CallSDPStreamMetadataChangedPrefix,
content,
txid: txid,
);
}