Skip to content

Commit

Permalink
feat(MeetingsAdapter) add methods and flags related to meeting password
Browse files Browse the repository at this point in the history
  • Loading branch information
karinasigartau0798 authored and arun3528 committed Oct 21, 2021
1 parent cdfccef commit 328e1ff
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 12 deletions.
46 changes: 34 additions & 12 deletions src/MeetingsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ import WebexAdapter from './WebexAdapter';
* A meeting object that allows users to have a WebRTC meeting.
*
* @typedef {object} Meeting
* @property {string} ID The meeting identifier
* @property {string} title The title of the meeting
* @property {MeetingStream} localVideo The local video information
* @property {MeetingStream} localAudio The local audio information
* @property {MeetingStream} localShare The local share information
* @property {MediaStream} remoteVideo The remote video stream
* @property {MediaStream} remoteAudio The remote audio stream
* @property {MediaStream} remoteShare The remote media share stream
* @property {MeetingState} state The state of the meeting
* @property {string} cameraID The ID of the camera in use
* @property {string} microphoneID The ID of the microphone in use
* @property {string} speakerID The ID of the speaker in use
* @property {string} ID The meeting identifier
* @property {string} title The title of the meeting
* @property {MeetingStream} localVideo The local video information
* @property {MeetingStream} localAudio The local audio information
* @property {MeetingStream} localShare The local share information
* @property {MediaStream} remoteVideo The remote video stream
* @property {MediaStream} remoteAudio The remote audio stream
* @property {MediaStream} remoteShare The remote media share stream
* @property {MeetingState} state The state of the meeting
* @property {string} cameraID The ID of the camera in use
* @property {string} microphoneID The ID of the microphone in use
* @property {string} speakerID The ID of the speaker in use
* @property {boolean} passwordRequired If the meeting requires a password
* @property {boolean} invalidPassword If the password received from the user is invalid
*/

/**
Expand Down Expand Up @@ -223,4 +225,24 @@ export default class MeetingsAdapter extends WebexAdapter {
supportedControls() {
return throwError(new Error('supportedControls() must be defined in MeetingsAdapter'));
}

/**
* Sets the passwordRequired flag to false.
*
* @param {string} ID Id of the meeting
* @returns {Promise|undefined}
*/
clearPasswordRequiredFlag(ID) {
throw new Error('clearPasswordRequiredFlag(ID) must be defined in MeetingsAdapter');
}

/**
* Sets the invalidPassword flag to false.
*
* @param {string} ID Id of the meeting
* @returns {Promise|undefined}
*/
clearInvalidPasswordFlag(ID) {
throw new Error('clearInvalidPasswordFlag(ID) must be defined in MeetingsAdapter');
}
}
12 changes: 12 additions & 0 deletions src/MeetingsAdapter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,16 @@ describe('Meetings Adapter Interface', () => {
expect(() => meetingsAdapter.leaveMeeting('meetingID')).toThrow('leaveMeeting(ID) must be defined in MeetingsAdapter');
});
});

describe('clearPasswordRequiredFlag()', () => {
test('errors because it needs to be defined', () => {
expect(() => meetingsAdapter.clearPasswordRequiredFlag('meetingID')).toThrow('clearPasswordRequiredFlag(ID) must be defined in MeetingsAdapter');
});
});

describe('clearInvalidPasswordFlag()', () => {
test('errors because it needs to be defined', () => {
expect(() => meetingsAdapter.clearInvalidPasswordFlag('meetingID')).toThrow('clearInvalidPasswordFlag(ID) must be defined in MeetingsAdapter');
});
});
});

0 comments on commit 328e1ff

Please sign in to comment.