Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend fields in the join room #514

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/main/js/webrtc_adaptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,15 +550,21 @@ 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 = {
command: "joinRoom",
room: roomName,
streamId: streamId,
mode: mode,
streamName: streamName,
role: role,
metadata: metadata,
}
this.webSocketAdaptor.send(JSON.stringify(jsCmd));
}
Expand Down Expand Up @@ -758,15 +764,17 @@ 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);
}
this.roomName = roomName;
var jsCmd = {
command: "leaveFromRoom",
room: roomName,
streamId: streamId,
};
Logger.debug("leave request is sent for " + roomName);

Expand Down
Loading