From 88a70545c1d84793a87f68b136a215e7dbdd921c Mon Sep 17 00:00:00 2001 From: Mustafa BOLEKEN Date: Mon, 11 Nov 2024 16:33:57 +0300 Subject: [PATCH 1/2] Extend fields in the join room --- src/main/js/webrtc_adaptor.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/js/webrtc_adaptor.js b/src/main/js/webrtc_adaptor.js index 0baf34d5..ab70a518 100644 --- a/src/main/js/webrtc_adaptor.js +++ b/src/main/js/webrtc_adaptor.js @@ -552,8 +552,11 @@ export class WebRTCAdaptor { * @param {string=} mode : legacy for older implementation (default value) * mcu for merging streams * amcu: audio only conferences with mixed audio + * @param {string=} streamName : name of the stream + * @param {string=} role : role for the stream. It is used for selective forwarding of subtracks in conference mode. + * @param {string=} metadata : a free text information for the stream to AMS. */ - joinRoom(roomName, streamId, mode) { + joinRoom(roomName, streamId, mode, streamName, role, metadata) { this.roomName = roomName; let jsCmd = { @@ -561,6 +564,9 @@ export class WebRTCAdaptor { room: roomName, streamId: streamId, mode: mode, + streamName: streamName, + role: role, + metadata: metadata, } this.webSocketAdaptor.send(JSON.stringify(jsCmd)); } From 191af4f1e727e0e6f6888340367b526df0a96bd5 Mon Sep 17 00:00:00 2001 From: Mustafa BOLEKEN Date: Mon, 11 Nov 2024 22:50:36 +0300 Subject: [PATCH 2/2] Add streamId parameter into the leaveFromRoom --- src/main/js/webrtc_adaptor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/js/webrtc_adaptor.js b/src/main/js/webrtc_adaptor.js index ab70a518..6a8aed52 100644 --- a/src/main/js/webrtc_adaptor.js +++ b/src/main/js/webrtc_adaptor.js @@ -763,8 +763,9 @@ export class WebRTCAdaptor { * Called to leave from a conference room. AMS responds with leavedTheRoom message. * Parameters: * @param {string} roomName : unique id for the conference room + * @param {string=} streamId : unique id for the stream that is streamed by this @WebRTCAdaptor */ - leaveFromRoom(roomName) { + leaveFromRoom(roomName, streamId) { for (var key in this.remotePeerConnection) { this.closePeerConnection(key); } @@ -772,6 +773,7 @@ export class WebRTCAdaptor { var jsCmd = { command: "leaveFromRoom", room: roomName, + streamId: streamId, }; Logger.debug("leave request is sent for " + roomName);