feat(external-api) add data-channel-open event
Signals that the bridge channel is open. It may take a few ms to get established after the conference join, so applications might be interested in using it once ready.
This commit is contained in:
parent
dd184763ff
commit
12139655c6
|
@ -1033,6 +1033,15 @@ class API {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify external application that the data channel has been opened.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
notifyDataChannelOpened() {
|
||||
this._sendEvent({ name: 'data-channel-opened' });
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify external application (if API is enabled) that we are ready to be
|
||||
* closed.
|
||||
|
|
|
@ -80,6 +80,7 @@ const events = {
|
|||
'camera-error': 'cameraError',
|
||||
'chat-updated': 'chatUpdated',
|
||||
'content-sharing-participants-changed': 'contentSharingParticipantsChanged',
|
||||
'data-channel-opened': 'dataChannelOpened',
|
||||
'device-list-changed': 'deviceListChanged',
|
||||
'display-name-change': 'displayNameChange',
|
||||
'email-change': 'emailChange',
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import {
|
||||
CONFERENCE_FAILED,
|
||||
CONFERENCE_JOINED,
|
||||
DATA_CHANNEL_OPENED,
|
||||
KICKED_OUT
|
||||
} from '../base/conference';
|
||||
import { NOTIFY_CAMERA_ERROR, NOTIFY_MIC_ERROR } from '../base/devices';
|
||||
|
@ -103,6 +104,10 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
break;
|
||||
}
|
||||
|
||||
case DATA_CHANNEL_OPENED:
|
||||
APP.API.notifyDataChannelOpened();
|
||||
break;
|
||||
|
||||
case DOMINANT_SPEAKER_CHANGED:
|
||||
APP.API.notifyDominantSpeakerChanged(action.participant.id);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue