feat(iframe_api): Implement readyToClose event and hangup command

This commit is contained in:
hristoterezov
2016-10-05 16:33:09 -05:00
parent 924bb3c7f7
commit 47d39ed5ca
5 changed files with 71 additions and 71 deletions

View File

@@ -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.
*/