diff --git a/src/main/js/webrtc_adaptor.js b/src/main/js/webrtc_adaptor.js index 17ecaa93..f14a94b0 100644 --- a/src/main/js/webrtc_adaptor.js +++ b/src/main/js/webrtc_adaptor.js @@ -550,8 +550,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 = { @@ -559,6 +562,9 @@ export class WebRTCAdaptor { room: roomName, streamId: streamId, mode: mode, + streamName: streamName, + role: role, + metadata: metadata, } this.webSocketAdaptor.send(JSON.stringify(jsCmd)); } @@ -758,8 +764,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); } @@ -767,6 +774,7 @@ export class WebRTCAdaptor { var jsCmd = { command: "leaveFromRoom", room: roomName, + streamId: streamId, }; Logger.debug("leave request is sent for " + roomName);