feat(iframe_api): Implement readyToClose event and hangup command
This commit is contained in:
+12
-2
@@ -50,7 +50,8 @@ function initCommands() {
|
||||
"toggle-film-strip": APP.UI.toggleFilmStrip,
|
||||
"toggle-chat": APP.UI.toggleChat,
|
||||
"toggle-contact-list": APP.UI.toggleContactList,
|
||||
"toggle-share-screen": APP.conference.toggleScreenSharing
|
||||
"toggle-share-screen": APP.conference.toggleScreenSharing,
|
||||
"video-hangup": () => APP.conference.hangup()
|
||||
};
|
||||
Object.keys(commands).forEach(function (key) {
|
||||
postis.listen(key, commands[key]);
|
||||
@@ -78,7 +79,8 @@ const events = {
|
||||
"participant-joined": false,
|
||||
"participant-left": false,
|
||||
"video-conference-joined": false,
|
||||
"video-conference-left": false
|
||||
"video-conference-left": false,
|
||||
"video-ready-to-close": false
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -243,6 +245,14 @@ export default {
|
||||
triggerEvent("video-conference-left", {roomName: room});
|
||||
},
|
||||
|
||||
/**
|
||||
* Notify external application (if API is enabled) that
|
||||
* we are ready to be closed.
|
||||
*/
|
||||
notifyReadyToClose () {
|
||||
triggerEvent("video-ready-to-close", {});
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the listeners.
|
||||
*/
|
||||
|
||||
Vendored
+6
-2
@@ -33,7 +33,8 @@ var commands = {
|
||||
"toggleFilmStrip": "toggle-film-strip",
|
||||
"toggleChat": "toggle-chat",
|
||||
"toggleContactList": "toggle-contact-list",
|
||||
"toggleShareScreen": "toggle-share-screen"
|
||||
"toggleShareScreen": "toggle-share-screen",
|
||||
"hangup": "video-hangup"
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -47,7 +48,8 @@ var events = {
|
||||
"participantJoined": "participant-joined",
|
||||
"participantLeft": "participant-left",
|
||||
"videoConferenceJoined": "video-conference-joined",
|
||||
"videoConferenceLeft": "video-conference-left"
|
||||
"videoConferenceLeft": "video-conference-left",
|
||||
"readyToClose": "video-ready-to-close"
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -246,6 +248,8 @@ JitsiMeetExternalAPI.prototype.executeCommands = function(object) {
|
||||
* {{
|
||||
* roomName: room //the room name of the conference
|
||||
* }}
|
||||
* readyToClose - all hangup operations are completed and Jitsi Meet is ready
|
||||
* to be disposed.
|
||||
* @param object
|
||||
*/
|
||||
JitsiMeetExternalAPI.prototype.addEventListeners = function(object) {
|
||||
|
||||
Reference in New Issue
Block a user