Skip to content

Commit

Permalink
feat(MeetingsAdapter): add joinMeeting() definition
Browse files Browse the repository at this point in the history
  • Loading branch information
lalli-flores authored and akoushke committed Dec 10, 2019
1 parent d83df0e commit 173cc78
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/MeetingsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,19 @@ export default class MeetingsAdapter extends WebexAdapter {
return throwError(new Error('getMeeting(ID) must be defined in MeetingsAdapter'));
}

/**
* Joins the meeting of the given ID.
* Joining a meeting is performed as a side-effect and this method does not
* return a value. Instead, joining a meeting should trigger getMeeting to
* emit a new updated Meeting object.
*
* @param {string} ID ID of the meeting to join.
* @memberof MeetingsAdapter
*/
joinMeeting(ID) {
throw new Error('joinMeeting(ID) must be defined in MeetingsAdapter');
}

/**
* Retrieves the local device media (video/audio) and adds them to the meeting
* with the some default media settings.
Expand Down
10 changes: 10 additions & 0 deletions src/MeetingsAdapter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ describe('Meetings Adapter Interface', () => {
});
});

describe('joinMeeting()', () => {
test('errors because it needs to be defined', () => {
try {
meetingsAdapter.joinMeeting('meetingID');
} catch (error) {
expect(error.message).toBe('joinMeeting(ID) must be defined in MeetingsAdapter');
}
});
});

describe('addLocalMedia()', () => {
test('errors because it needs to be defined', () => {
try {
Expand Down

0 comments on commit 173cc78

Please sign in to comment.