Skip to content

Commit

Permalink
feat(MeetingsSdkAdapter): send name and password when joining
Browse files Browse the repository at this point in the history
  • Loading branch information
lungancatalin authored and cipak committed Oct 14, 2021
1 parent 132fdf2 commit e0a0a85
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/MeetingsSDKAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,12 @@ export default class MeetingsSDKAdapter extends MeetingsAdapter {
* Attempts to join the meeting of the given meeting ID.
* If the meeting is successfully joined, a ready event is dispatched.
*
* @param {string} ID ID of the meeting to join
* @param {string} ID ID of the meeting to join
* @param {object} options Options for joining
* @param {string} [props.options.name] Username for meeting
* @param {number} [props.options.password] Meeting password
*/
async joinMeeting(ID) {
async joinMeeting(ID, options = {}) {
try {
const sdkMeeting = this.fetchMeeting(ID);
const localStream = new MediaStream();
Expand All @@ -555,7 +558,7 @@ export default class MeetingsSDKAdapter extends MeetingsAdapter {
localVideo.getTracks().forEach((track) => localStream.addTrack(track));
}

await sdkMeeting.join();
await sdkMeeting.join({pin: options.password, name: options.name});

// SDK requires to join the meeting before adding the local stream media to the meeting
await sdkMeeting.addMedia({localStream, mediaSettings});
Expand Down

0 comments on commit e0a0a85

Please sign in to comment.