diff --git a/index.html b/index.html index d68933057..266edb6f9 100644 --- a/index.html +++ b/index.html @@ -19,9 +19,9 @@ - + - + diff --git a/libs/app.bundle.js b/libs/app.bundle.js index fc6f59338..68bc3abe3 100644 --- a/libs/app.bundle.js +++ b/libs/app.bundle.js @@ -16,6 +16,8 @@ var APP = this.keyboardshortcut = require("./modules/keyboardshortcut/keyboardshortcut"); this.translation = require("./modules/translation/translation"); this.settings = require("./modules/settings/Settings"); + this.DTMF = require("./modules/DTMF/DTMF"); + this.members = require("./modules/members/MemberList"); } }; @@ -30,6 +32,7 @@ function init() { APP.desktopsharing.init(); APP.keyboardshortcut.init(); + APP.members.start(); } @@ -54,7 +57,7 @@ $(window).bind('beforeunload', function () { module.exports = APP; -},{"./modules/API/API":2,"./modules/RTC/RTC":6,"./modules/UI/UI":8,"./modules/connectionquality/connectionquality":35,"./modules/desktopsharing/desktopsharing":36,"./modules/keyboardshortcut/keyboardshortcut":37,"./modules/settings/Settings":38,"./modules/simulcast/simulcast":43,"./modules/statistics/statistics":46,"./modules/translation/translation":47,"./modules/xmpp/xmpp":61}],2:[function(require,module,exports){ +},{"./modules/API/API":2,"./modules/DTMF/DTMF":3,"./modules/RTC/RTC":7,"./modules/UI/UI":9,"./modules/connectionquality/connectionquality":36,"./modules/desktopsharing/desktopsharing":37,"./modules/keyboardshortcut/keyboardshortcut":38,"./modules/members/MemberList":39,"./modules/settings/Settings":40,"./modules/simulcast/simulcast":45,"./modules/statistics/statistics":48,"./modules/translation/translation":49,"./modules/xmpp/xmpp":63}],2:[function(require,module,exports){ /** * Implements API class that communicates with external api class * and provides interface to access Jitsi Meet features by external @@ -192,7 +195,7 @@ function processMessage(event) } function setupListeners() { - APP.xmpp.addListener(XMPPEvents.MUC_ENTER, function (from) { + APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_JOINED, function (from) { API.triggerEvent("participantJoined", {jid: from}); }); APP.xmpp.addListener(XMPPEvents.MESSAGE_RECEIVED, function (from, nick, txt, myjid) { @@ -200,7 +203,7 @@ function setupListeners() { API.triggerEvent("incomingMessage", {"from": from, "nick": nick, "message": txt}); }); - APP.xmpp.addListener(XMPPEvents.MUC_LEFT, function (jid) { + APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, function (jid) { API.triggerEvent("participantLeft", {jid: jid}); }); APP.xmpp.addListener(XMPPEvents.DISPLAY_NAME_CHANGED, function (jid, newDisplayName) { @@ -286,7 +289,56 @@ var API = { }; module.exports = API; -},{"../../service/xmpp/XMPPEvents":97}],3:[function(require,module,exports){ +},{"../../service/xmpp/XMPPEvents":100}],3:[function(require,module,exports){ +/* global APP */ + +/** + * A module for sending DTMF tones. + */ +var DTMFSender; +var initDtmfSender = function() { + // TODO: This needs to reset this if the peerconnection changes + // (e.g. the call is re-made) + if (DTMFSender) + return; + + var localAudio = APP.RTC.localAudio; + if (localAudio && localAudio.getTracks().length > 0) + { + var peerconnection + = APP.xmpp.getConnection().jingle.activecall.peerconnection; + if (peerconnection) { + DTMFSender = + peerconnection.peerconnection + .createDTMFSender(localAudio.getTracks()[0]); + console.log("Initialized DTMFSender"); + } + else { + console.log("Failed to initialize DTMFSender: no PeerConnection."); + } + } + else { + console.log("Failed to initialize DTMFSender: no audio track."); + } +}; + +var DTMF = { + sendTones: function (tones, duration, pause) { + if (!DTMFSender) + initDtmfSender(); + + if (DTMFSender){ + DTMFSender.insertDTMF(tones, + (duration || 200), + (pause || 200)); + } + } +}; + +module.exports = DTMF; + + +},{}],4:[function(require,module,exports){ /* global Strophe, focusedVideoSrc*/ // cache datachannels to avoid garbage collection @@ -522,7 +574,7 @@ function onPinnedEndpointChanged(userResource) module.exports = DataChannels; -},{"../../service/RTC/RTCEvents":89}],4:[function(require,module,exports){ +},{"../../service/RTC/RTCEvents":91}],5:[function(require,module,exports){ var StreamEventTypes = require("../../service/RTC/StreamEventTypes.js"); @@ -630,7 +682,7 @@ LocalStream.prototype.getId = function () { module.exports = LocalStream; -},{"../../service/RTC/StreamEventTypes.js":91}],5:[function(require,module,exports){ +},{"../../service/RTC/StreamEventTypes.js":93}],6:[function(require,module,exports){ ////These lines should be uncommented when require works in app.js var MediaStreamType = require("../../service/RTC/MediaStreamTypes"); var StreamEventType = require("../../service/RTC/StreamEventTypes"); @@ -692,7 +744,7 @@ MediaStream.prototype.setVideoType = function (value) { module.exports = MediaStream; -},{"../../service/RTC/MediaStreamTypes":87,"../../service/RTC/StreamEventTypes":91}],6:[function(require,module,exports){ +},{"../../service/RTC/MediaStreamTypes":89,"../../service/RTC/StreamEventTypes":93}],7:[function(require,module,exports){ var EventEmitter = require("events"); var RTCUtils = require("./RTCUtils.js"); var LocalStream = require("./LocalStream.js"); @@ -812,7 +864,7 @@ var RTC = { function (stream, isUsingScreenStream, callback) { self.changeLocalVideo(stream, isUsingScreenStream, callback); }, DesktopSharingEventTypes.NEW_STREAM_CREATED); - APP.xmpp.addListener(XMPPEvents.CHANGED_STREAMS, function (jid, changedStreams) { + APP.xmpp.addListener(XMPPEvents.STREAMS_CHANGED, function (jid, changedStreams) { for(var i = 0; i < changedStreams.length; i++) { var type = changedStreams[i].type; if (type != "audio") { @@ -939,7 +991,7 @@ var RTC = { module.exports = RTC; -},{"../../service/RTC/MediaStreamTypes":87,"../../service/RTC/RTCEvents.js":89,"../../service/RTC/StreamEventTypes.js":91,"../../service/UI/UIEvents":92,"../../service/desktopsharing/DesktopSharingEventTypes":95,"../../service/xmpp/XMPPEvents":97,"./DataChannels":3,"./LocalStream.js":4,"./MediaStream.js":5,"./RTCUtils.js":7,"events":98}],7:[function(require,module,exports){ +},{"../../service/RTC/MediaStreamTypes":89,"../../service/RTC/RTCEvents.js":91,"../../service/RTC/StreamEventTypes.js":93,"../../service/UI/UIEvents":94,"../../service/desktopsharing/DesktopSharingEventTypes":97,"../../service/xmpp/XMPPEvents":100,"./DataChannels":4,"./LocalStream.js":5,"./MediaStream.js":6,"./RTCUtils.js":8,"events":101}],8:[function(require,module,exports){ var RTCBrowserType = require("../../service/RTC/RTCBrowserType.js"); var Resolutions = require("../../service/RTC/Resolutions"); @@ -1352,7 +1404,7 @@ RTCUtils.prototype.createVideoStream = function(stream) module.exports = RTCUtils; -},{"../../service/RTC/RTCBrowserType.js":88,"../../service/RTC/Resolutions":90}],8:[function(require,module,exports){ +},{"../../service/RTC/RTCBrowserType.js":90,"../../service/RTC/Resolutions":92}],9:[function(require,module,exports){ var UI = {}; var VideoLayout = require("./videolayout/VideoLayout.js"); @@ -1381,6 +1433,7 @@ var DesktopSharingEventTypes var RTCEvents = require("../../service/RTC/RTCEvents"); var StreamEventTypes = require("../../service/RTC/StreamEventTypes"); var XMPPEvents = require("../../service/xmpp/XMPPEvents"); +var MemberEvents = require("../../service/members/Events"); var eventEmitter = new EventEmitter(); var roomName = null; @@ -1540,7 +1593,7 @@ function registerListeners() { APP.xmpp.addListener(XMPPEvents.USER_ID_CHANGED, function (from, id) { Avatar.setUserAvatar(from, id); }); - APP.xmpp.addListener(XMPPEvents.CHANGED_STREAMS, function (jid, changedStreams) { + APP.xmpp.addListener(XMPPEvents.STREAMS_CHANGED, function (jid, changedStreams) { for(stream in changedStreams) { // might need to update the direction if participant just went from sendrecv to recvonly @@ -1562,14 +1615,14 @@ function registerListeners() { }); APP.xmpp.addListener(XMPPEvents.DISPLAY_NAME_CHANGED, onDisplayNameChanged); APP.xmpp.addListener(XMPPEvents.MUC_JOINED, onMucJoined); - APP.xmpp.addListener(XMPPEvents.LOCALROLE_CHANGED, onLocalRoleChange); - APP.xmpp.addListener(XMPPEvents.MUC_ENTER, onMucEntered); + APP.xmpp.addListener(XMPPEvents.LOCAL_ROLE_CHANGED, onLocalRoleChanged); + APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_JOINED, onMucMemberJoined); APP.xmpp.addListener(XMPPEvents.MUC_ROLE_CHANGED, onMucRoleChanged); APP.xmpp.addListener(XMPPEvents.PRESENCE_STATUS, onMucPresenceStatus); APP.xmpp.addListener(XMPPEvents.SUBJECT_CHANGED, chatSetSubject); APP.xmpp.addListener(XMPPEvents.MESSAGE_RECEIVED, updateChatConversation); - APP.xmpp.addListener(XMPPEvents.MUC_LEFT, onMucLeft); - APP.xmpp.addListener(XMPPEvents.PASSWORD_REQUIRED, onPasswordReqiured); + APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, onMucMemberLeft); + APP.xmpp.addListener(XMPPEvents.PASSWORD_REQUIRED, onPasswordRequired); APP.xmpp.addListener(XMPPEvents.CHAT_ERROR_RECEIVED, chatAddError); APP.xmpp.addListener(XMPPEvents.ETHERPAD, initEtherpad); APP.xmpp.addListener(XMPPEvents.AUTHENTICATION_REQUIRED, @@ -1579,6 +1632,8 @@ function registerListeners() { VideoLayout.setDeviceAvailabilityIcons(resource, devices); }); + APP.members.addListener(MemberEvents.DTMF_SUPPORT_CHANGED, + onDtmfSupportChanged); } @@ -1772,7 +1827,7 @@ function initEtherpad(name) { Etherpad.init(name); }; -function onMucLeft(jid) { +function onMucMemberLeft(jid) { console.log('left.muc', jid); var displayName = $('#participant_' + Strophe.getResourceFromJid(jid) + '>.displayname').html(); @@ -1799,7 +1854,7 @@ function onMucLeft(jid) { }; -function onLocalRoleChange(jid, info, pres, isModerator) +function onLocalRoleChanged(jid, info, pres, isModerator) { console.info("My role changed, new role: " + info.role); @@ -1828,7 +1883,7 @@ function onModeratorStatusChanged(isModerator) { } }; -function onPasswordReqiured(callback) { +function onPasswordRequired(callback) { // password is required Toolbar.lockLockButton(); var message = '

'; @@ -1857,7 +1912,17 @@ function onPasswordReqiured(callback) { ':input:first' ); } -function onMucEntered(jid, id, displayName) { + +/** + * The dialpad button is shown iff there is at least one member that supports + * DTMF (e.g. jigasi). + */ +function onDtmfSupportChanged(dtmfSupport) { + //TODO: enable when the UI is ready + //Toolbar.showDialPadButton(dtmfSupport); +} + +function onMucMemberJoined(jid, id, displayName) { messageHandler.notify(displayName,'notify.somebody', 'connected', 'notify.connected'); @@ -2109,7 +2174,7 @@ UI.setVideoMuteButtonsState = function (mute) { module.exports = UI; -},{"../../service/RTC/RTCEvents":89,"../../service/RTC/StreamEventTypes":91,"../../service/connectionquality/CQEvents":94,"../../service/desktopsharing/DesktopSharingEventTypes":95,"../../service/xmpp/XMPPEvents":97,"./../settings/Settings":38,"./audio_levels/AudioLevels.js":9,"./authentication/Authentication":11,"./avatar/Avatar":13,"./etherpad/Etherpad.js":14,"./prezi/Prezi.js":15,"./side_pannels/SidePanelToggler":17,"./side_pannels/chat/Chat.js":18,"./side_pannels/contactlist/ContactList":22,"./side_pannels/settings/SettingsMenu":23,"./toolbars/BottomToolbar":24,"./toolbars/Toolbar":25,"./toolbars/ToolbarToggler":26,"./util/MessageHandler":28,"./util/NicknameHandler":29,"./util/UIUtil":30,"./videolayout/VideoLayout.js":32,"./welcome_page/RoomnameGenerator":33,"./welcome_page/WelcomePage":34,"events":98}],9:[function(require,module,exports){ +},{"../../service/RTC/RTCEvents":91,"../../service/RTC/StreamEventTypes":93,"../../service/connectionquality/CQEvents":96,"../../service/desktopsharing/DesktopSharingEventTypes":97,"../../service/members/Events":98,"../../service/xmpp/XMPPEvents":100,"./../settings/Settings":40,"./audio_levels/AudioLevels.js":10,"./authentication/Authentication":12,"./avatar/Avatar":14,"./etherpad/Etherpad.js":15,"./prezi/Prezi.js":16,"./side_pannels/SidePanelToggler":18,"./side_pannels/chat/Chat.js":19,"./side_pannels/contactlist/ContactList":23,"./side_pannels/settings/SettingsMenu":24,"./toolbars/BottomToolbar":25,"./toolbars/Toolbar":26,"./toolbars/ToolbarToggler":27,"./util/MessageHandler":29,"./util/NicknameHandler":30,"./util/UIUtil":31,"./videolayout/VideoLayout.js":33,"./welcome_page/RoomnameGenerator":34,"./welcome_page/WelcomePage":35,"events":101}],10:[function(require,module,exports){ var CanvasUtil = require("./CanvasUtils"); var ASDrawContext = $('#activeSpeakerAudioLevel')[0].getContext('2d'); @@ -2375,7 +2440,7 @@ var AudioLevels = (function(my) { })(AudioLevels || {}); module.exports = AudioLevels; -},{"./CanvasUtils":10}],10:[function(require,module,exports){ +},{"./CanvasUtils":11}],11:[function(require,module,exports){ /** * Utility class for drawing canvas shapes. */ @@ -2487,7 +2552,7 @@ var CanvasUtil = (function(my) { })(CanvasUtil || {}); module.exports = CanvasUtil; -},{}],11:[function(require,module,exports){ +},{}],12:[function(require,module,exports){ /* global $, APP*/ var LoginDialog = require('./LoginDialog'); @@ -2612,7 +2677,7 @@ var Authentication = { }; module.exports = Authentication; -},{"../../xmpp/moderator":53,"./LoginDialog":12}],12:[function(require,module,exports){ +},{"../../xmpp/moderator":55,"./LoginDialog":13}],13:[function(require,module,exports){ /* global $, APP, config*/ var XMPP = require('../../xmpp/xmpp'); @@ -2841,7 +2906,7 @@ var LoginDialog = { }; module.exports = LoginDialog; -},{"../../xmpp/moderator":53,"../../xmpp/xmpp":61}],13:[function(require,module,exports){ +},{"../../xmpp/moderator":55,"../../xmpp/xmpp":63}],14:[function(require,module,exports){ var Settings = require("../../settings/Settings"); var MediaStreamType = require("../../../service/RTC/MediaStreamTypes"); @@ -2997,7 +3062,7 @@ var Avatar = { module.exports = Avatar; -},{"../../../service/RTC/MediaStreamTypes":87,"../../settings/Settings":38,"../videolayout/VideoLayout":32}],14:[function(require,module,exports){ +},{"../../../service/RTC/MediaStreamTypes":89,"../../settings/Settings":40,"../videolayout/VideoLayout":33}],15:[function(require,module,exports){ /* global $, config, setLargeVideoVisible, Util */ @@ -3193,7 +3258,7 @@ var Etherpad = { module.exports = Etherpad; -},{"../prezi/Prezi":15,"../util/UIUtil":30,"../videolayout/VideoLayout":32}],15:[function(require,module,exports){ +},{"../prezi/Prezi":16,"../util/UIUtil":31,"../videolayout/VideoLayout":33}],16:[function(require,module,exports){ var ToolbarToggler = require("../toolbars/ToolbarToggler"); var UIUtil = require("../util/UIUtil"); var VideoLayout = require("../videolayout/VideoLayout"); @@ -3569,7 +3634,7 @@ $(window).resize(function () { module.exports = Prezi; -},{"../toolbars/ToolbarToggler":26,"../util/MessageHandler":28,"../util/UIUtil":30,"../videolayout/VideoLayout":32,"./PreziPlayer":16}],16:[function(require,module,exports){ +},{"../toolbars/ToolbarToggler":27,"../util/MessageHandler":29,"../util/UIUtil":31,"../videolayout/VideoLayout":33,"./PreziPlayer":17}],17:[function(require,module,exports){ (function() { "use strict"; var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; @@ -3865,7 +3930,7 @@ module.exports = Prezi; module.exports = PreziPlayer; -},{}],17:[function(require,module,exports){ +},{}],18:[function(require,module,exports){ var Chat = require("./chat/Chat"); var ContactList = require("./contactlist/ContactList"); var Settings = require("./../../settings/Settings"); @@ -4122,7 +4187,7 @@ var PanelToggler = (function(my) { }(PanelToggler || {})); module.exports = PanelToggler; -},{"../toolbars/ToolbarToggler":26,"../util/UIUtil":30,"../videolayout/VideoLayout":32,"./../../settings/Settings":38,"./chat/Chat":18,"./contactlist/ContactList":22,"./settings/SettingsMenu":23}],18:[function(require,module,exports){ +},{"../toolbars/ToolbarToggler":27,"../util/UIUtil":31,"../videolayout/VideoLayout":33,"./../../settings/Settings":40,"./chat/Chat":19,"./contactlist/ContactList":23,"./settings/SettingsMenu":24}],19:[function(require,module,exports){ /* global $, Util, nickname:true */ var Replacement = require("./Replacement"); var CommandsProcessor = require("./Commands"); @@ -4480,7 +4545,7 @@ var Chat = (function (my) { return my; }(Chat || {})); module.exports = Chat; -},{"../../../../service/UI/UIEvents":92,"../../toolbars/ToolbarToggler":26,"../../util/NicknameHandler":29,"../../util/UIUtil":30,"../SidePanelToggler":17,"./Commands":19,"./Replacement":20,"./smileys.json":21}],19:[function(require,module,exports){ +},{"../../../../service/UI/UIEvents":94,"../../toolbars/ToolbarToggler":27,"../../util/NicknameHandler":30,"../../util/UIUtil":31,"../SidePanelToggler":18,"./Commands":20,"./Replacement":21,"./smileys.json":22}],20:[function(require,module,exports){ var UIUtil = require("../../util/UIUtil"); /** @@ -4578,7 +4643,7 @@ CommandsProcessor.prototype.processCommand = function() }; module.exports = CommandsProcessor; -},{"../../util/UIUtil":30}],20:[function(require,module,exports){ +},{"../../util/UIUtil":31}],21:[function(require,module,exports){ var Smileys = require("./smileys.json"); /** * Processes links and smileys in "body" @@ -4642,7 +4707,7 @@ module.exports = { linkify: linkify }; -},{"./smileys.json":21}],21:[function(require,module,exports){ +},{"./smileys.json":22}],22:[function(require,module,exports){ module.exports={ "smileys": { "smiley1": ":)", @@ -4692,7 +4757,7 @@ module.exports={ } } -},{}],22:[function(require,module,exports){ +},{}],23:[function(require,module,exports){ var numberOfContacts = 0; var notificationInterval; @@ -4882,7 +4947,7 @@ var ContactList = { }; module.exports = ContactList; -},{}],23:[function(require,module,exports){ +},{}],24:[function(require,module,exports){ var Avatar = require("../../avatar/Avatar"); var Settings = require("./../../../settings/Settings"); var UIUtil = require("../../util/UIUtil"); @@ -4963,7 +5028,7 @@ var SettingsMenu = { module.exports = SettingsMenu; -},{"../../../../service/translation/languages":96,"../../avatar/Avatar":13,"../../util/UIUtil":30,"./../../../settings/Settings":38}],24:[function(require,module,exports){ +},{"../../../../service/translation/languages":99,"../../avatar/Avatar":14,"../../util/UIUtil":31,"./../../../settings/Settings":40}],25:[function(require,module,exports){ var PanelToggler = require("../side_pannels/SidePanelToggler"); var buttonHandlers = { @@ -5008,7 +5073,7 @@ var BottomToolbar = (function (my) { module.exports = BottomToolbar; -},{"../side_pannels/SidePanelToggler":17}],25:[function(require,module,exports){ +},{"../side_pannels/SidePanelToggler":18}],26:[function(require,module,exports){ /* global APP,$, buttonClick, config, lockRoom, setSharedKey, Util */ var messageHandler = require("../util/MessageHandler"); @@ -5065,6 +5130,9 @@ var buttonHandlers = "toolbar_button_sip": function () { return callSipButtonClicked(); }, + "toolbar_button_dialpad": function () { + return dialpadButtonClicked(); + }, "toolbar_button_settings": function () { PanelToggler.toggleSettingsMenu(); }, @@ -5232,6 +5300,11 @@ function inviteParticipants() { window.open("mailto:?subject=" + subject + "&body=" + body, '_blank'); } +function dialpadButtonClicked() +{ + //TODO show the dialpad window +} + function callSipButtonClicked() { var defaultNumber @@ -5560,12 +5633,13 @@ var Toolbar = (function (my) { // Sets the state of the recording button my.setRecordingButtonState = function (isRecording) { + var selector = $('#recordButton'); if (isRecording) { - $('#recordButton').removeClass("icon-recEnable"); - $('#recordButton').addClass("icon-recEnable active"); + selector.removeClass("icon-recEnable"); + selector.addClass("icon-recEnable active"); } else { - $('#recordButton').removeClass("icon-recEnable active"); - $('#recordButton').addClass("icon-recEnable"); + selector.removeClass("icon-recEnable active"); + selector.addClass("icon-recEnable"); } }; @@ -5578,14 +5652,24 @@ var Toolbar = (function (my) { } }; + // Shows or hides the dialpad button + my.showDialPadButton = function (show) { + if (show) { + $('#dialPadButton').css({display: "inline-block"}); + } else { + $('#dialPadButton').css({display: "none"}); + } + }; + /** * Displays user authenticated identity name(login). * @param authIdentity identity name to be displayed. */ my.setAuthenticatedIdentity = function (authIdentity) { if (authIdentity) { - $('#toolbar_auth_identity').css({display: "list-item"}); - $('#toolbar_auth_identity').text(authIdentity); + var selector = $('#toolbar_auth_identity'); + selector.css({display: "list-item"}); + selector.text(authIdentity); } else { $('#toolbar_auth_identity').css({display: "none"}); } @@ -5636,7 +5720,7 @@ var Toolbar = (function (my) { }(Toolbar || {})); module.exports = Toolbar; -},{"../../../service/authentication/AuthenticationEvents":93,"../authentication/Authentication":11,"../etherpad/Etherpad":14,"../prezi/Prezi":15,"../side_pannels/SidePanelToggler":17,"../util/MessageHandler":28,"../util/UIUtil":30,"./BottomToolbar":24}],26:[function(require,module,exports){ +},{"../../../service/authentication/AuthenticationEvents":95,"../authentication/Authentication":12,"../etherpad/Etherpad":15,"../prezi/Prezi":16,"../side_pannels/SidePanelToggler":18,"../util/MessageHandler":29,"../util/UIUtil":31,"./BottomToolbar":25}],27:[function(require,module,exports){ /* global $, interfaceConfig, Moderator, DesktopStreaming.showDesktopSharingButton */ var toolbarTimeoutObject, @@ -5751,7 +5835,7 @@ var ToolbarToggler = { }; module.exports = ToolbarToggler; -},{}],27:[function(require,module,exports){ +},{}],28:[function(require,module,exports){ var JitsiPopover = (function () { /** * Constructs new JitsiPopover and attaches it to the element @@ -5875,7 +5959,7 @@ var JitsiPopover = (function () { })(); module.exports = JitsiPopover; -},{}],28:[function(require,module,exports){ +},{}],29:[function(require,module,exports){ /* global $, APP, jQuery, toastr */ var messageHandler = (function(my) { @@ -6083,7 +6167,7 @@ module.exports = messageHandler; -},{}],29:[function(require,module,exports){ +},{}],30:[function(require,module,exports){ var UIEvents = require("../../../service/UI/UIEvents"); var nickname = null; @@ -6114,7 +6198,7 @@ var NickanameHandler = { }; module.exports = NickanameHandler; -},{"../../../service/UI/UIEvents":92}],30:[function(require,module,exports){ +},{"../../../service/UI/UIEvents":94}],31:[function(require,module,exports){ /** * Created by hristo on 12/22/14. */ @@ -6196,7 +6280,7 @@ module.exports = { }; -},{"../side_pannels/SidePanelToggler":17}],31:[function(require,module,exports){ +},{"../side_pannels/SidePanelToggler":18}],32:[function(require,module,exports){ var JitsiPopover = require("../util/JitsiPopover"); /** @@ -6624,7 +6708,7 @@ ConnectionIndicator.prototype.hideIndicator = function () { }; module.exports = ConnectionIndicator; -},{"../util/JitsiPopover":27}],32:[function(require,module,exports){ +},{"../util/JitsiPopover":28}],33:[function(require,module,exports){ var AudioLevels = require("../audio_levels/AudioLevels"); var Avatar = require("../avatar/Avatar"); var Chat = require("../side_pannels/chat/Chat"); @@ -8922,7 +9006,7 @@ var VideoLayout = (function (my) { }(VideoLayout || {})); module.exports = VideoLayout; -},{"../../../service/RTC/MediaStreamTypes":87,"../../../service/UI/UIEvents":92,"../audio_levels/AudioLevels":9,"../avatar/Avatar":13,"../etherpad/Etherpad":14,"../prezi/Prezi":15,"../side_pannels/chat/Chat":18,"../side_pannels/contactlist/ContactList":22,"../util/NicknameHandler":29,"../util/UIUtil":30,"./ConnectionIndicator":31}],33:[function(require,module,exports){ +},{"../../../service/RTC/MediaStreamTypes":89,"../../../service/UI/UIEvents":94,"../audio_levels/AudioLevels":10,"../avatar/Avatar":14,"../etherpad/Etherpad":15,"../prezi/Prezi":16,"../side_pannels/chat/Chat":19,"../side_pannels/contactlist/ContactList":23,"../util/NicknameHandler":30,"../util/UIUtil":31,"./ConnectionIndicator":32}],34:[function(require,module,exports){ //var nouns = [ //]; var pluralNouns = [ @@ -9103,7 +9187,7 @@ var RoomNameGenerator = { module.exports = RoomNameGenerator; -},{}],34:[function(require,module,exports){ +},{}],35:[function(require,module,exports){ var animateTimeout, updateTimeout; var RoomNameGenerator = require("./RoomnameGenerator"); @@ -9205,7 +9289,7 @@ function setupWelcomePage() } module.exports = setupWelcomePage; -},{"./RoomnameGenerator":33}],35:[function(require,module,exports){ +},{"./RoomnameGenerator":34}],36:[function(require,module,exports){ var EventEmitter = require("events"); var eventEmitter = new EventEmitter(); var CQEvents = require("../../service/connectionquality/CQEvents"); @@ -9340,7 +9424,7 @@ var ConnectionQuality = { }; module.exports = ConnectionQuality; -},{"../../service/connectionquality/CQEvents":94,"../../service/xmpp/XMPPEvents":97,"events":98}],36:[function(require,module,exports){ +},{"../../service/connectionquality/CQEvents":96,"../../service/xmpp/XMPPEvents":100,"events":101}],37:[function(require,module,exports){ /* global $, alert, APP, changeLocalVideo, chrome, config, getConferenceHandler, getUserMediaWithConstraints */ /** @@ -9708,7 +9792,7 @@ module.exports = { }; -},{"../../service/desktopsharing/DesktopSharingEventTypes":95,"events":98}],37:[function(require,module,exports){ +},{"../../service/desktopsharing/DesktopSharingEventTypes":97,"events":101}],38:[function(require,module,exports){ //maps keycode to character, id of popover for given function and function var shortcuts = { 67: { @@ -9801,7 +9885,132 @@ var KeyboardShortcut = { module.exports = KeyboardShortcut; -},{}],38:[function(require,module,exports){ +},{}],39:[function(require,module,exports){ +/* global APP */ + +/** + * This module is meant to (eventually) contain and manage all information + * about members/participants of the conference, so that other modules don't + * have to do it on their own, and so that other modules can access members' + * information from a single place. + * + * Currently this module only manages information about the support of jingle + * DTMF of the members. Other fields, as well as accessor methods are meant to + * be added as needed. + */ + +var XMPPEvents = require("../../service/xmpp/XMPPEvents"); +var Events = require("../../service/members/Events"); +var EventEmitter = require("events"); + +var eventEmitter = new EventEmitter(); + +/** + * The actual container. + */ +var members = {}; + +/** + * There is at least one member that supports DTMF (i.e. is jigasi). + */ +var atLeastOneDtmf = false; + + +function registerListeners() { + APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_JOINED, onMucMemberJoined); + APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, onMucMemberLeft); +} + +/** + * Handles a new member joining the MUC. + */ +function onMucMemberJoined(jid, id, displayName) { + var member = { + displayName: displayName + }; + + APP.xmpp.getConnection().disco.info( + jid, "" /* node */, function(iq) { onDiscoInfoReceived(jid, iq); }); + + members[jid] = member; +} + +/** + * Handles a member leaving the MUC. + */ +function onMucMemberLeft(jid) { + delete members[jid]; + updateAtLeastOneDtmf(); +} + +/** + * Handles the reception of a disco#info packet from a particular JID. + * @param jid the JID sending the packet. + * @param iq the packet. + */ +function onDiscoInfoReceived(jid, iq) { + if (!members[jid]) + return; + + var supportsDtmf + = $(iq).find('>query>feature[var="urn:xmpp:jingle:dtmf:0"]').length > 0; + updateDtmf(jid, supportsDtmf); +} + +/** + * Updates the 'supportsDtmf' field for a member. + * @param jid the jid of the member. + * @param newValue the new value for the 'supportsDtmf' field. + */ +function updateDtmf(jid, newValue) { + var oldValue = members[jid].supportsDtmf; + members[jid].supportsDtmf = newValue; + + if (newValue != oldValue) { + updateAtLeastOneDtmf(); + } +} + +/** + * Checks each member's 'supportsDtmf' field and updates + * 'atLastOneSupportsDtmf'. + */ +function updateAtLeastOneDtmf(){ + var newAtLeastOneDtmf = false; + for (var key in members) { + if (typeof members[key].supportsDtmf !== 'undefined' + && members[key].supportsDtmf) { + newAtLeastOneDtmf= true; + break; + } + } + + if (atLeastOneDtmf != newAtLeastOneDtmf) { + atLeastOneDtmf = newAtLeastOneDtmf; + eventEmitter.emit(Events.DTMF_SUPPORT_CHANGED, atLeastOneDtmf); + } +} + + +/** + * Exported interface. + */ +var Members = { + start: function(){ + registerListeners(); + }, + addListener: function(type, listener) + { + eventEmitter.on(type, listener); + }, + removeListener: function (type, listener) { + eventEmitter.removeListener(type, listener); + } +}; + +module.exports = Members; + +},{"../../service/members/Events":98,"../../service/xmpp/XMPPEvents":100,"events":101}],40:[function(require,module,exports){ var email = ''; var displayName = ''; var userId; @@ -9868,7 +10077,7 @@ var Settings = module.exports = Settings; -},{}],39:[function(require,module,exports){ +},{}],41:[function(require,module,exports){ /** * * @constructor @@ -9901,7 +10110,7 @@ SimulcastLogger.prototype.error = function (text) { }; module.exports = SimulcastLogger; -},{}],40:[function(require,module,exports){ +},{}],42:[function(require,module,exports){ var SimulcastLogger = require("./SimulcastLogger"); var SimulcastUtils = require("./SimulcastUtils"); var MediaStreamType = require("../../service/RTC/MediaStreamTypes"); @@ -10170,7 +10379,7 @@ SimulcastReceiver.prototype.transformRemoteDescription = function (desc) { }; module.exports = SimulcastReceiver; -},{"../../service/RTC/MediaStreamTypes":87,"./SimulcastLogger":39,"./SimulcastUtils":42}],41:[function(require,module,exports){ +},{"../../service/RTC/MediaStreamTypes":89,"./SimulcastLogger":41,"./SimulcastUtils":44}],43:[function(require,module,exports){ var SimulcastLogger = require("./SimulcastLogger"); var SimulcastUtils = require("./SimulcastUtils"); @@ -10693,7 +10902,7 @@ module.exports = { "no": NoSimulcastSender } -},{"./SimulcastLogger":39,"./SimulcastUtils":42}],42:[function(require,module,exports){ +},{"./SimulcastLogger":41,"./SimulcastUtils":44}],44:[function(require,module,exports){ var SimulcastLogger = require("./SimulcastLogger"); /** @@ -10927,7 +11136,7 @@ SimulcastUtils.prototype._compileVideoSources = function (videoSources) { }; module.exports = SimulcastUtils; -},{"./SimulcastLogger":39}],43:[function(require,module,exports){ +},{"./SimulcastLogger":41}],45:[function(require,module,exports){ /*jslint plusplus: true */ /*jslint nomen: true*/ @@ -11130,7 +11339,7 @@ SimulcastManager.prototype.resetSender = function() { var simulcast = new SimulcastManager(); module.exports = simulcast; -},{"../../service/RTC/RTCEvents":89,"./SimulcastReceiver":40,"./SimulcastSender":41,"./SimulcastUtils":42}],44:[function(require,module,exports){ +},{"../../service/RTC/RTCEvents":91,"./SimulcastReceiver":42,"./SimulcastSender":43,"./SimulcastUtils":44}],46:[function(require,module,exports){ /** * Provides statistics for the local stream. */ @@ -11261,7 +11470,7 @@ LocalStatsCollector.prototype.stop = function () { }; module.exports = LocalStatsCollector; -},{}],45:[function(require,module,exports){ +},{}],47:[function(require,module,exports){ /* global ssrc2jid */ /* jshint -W117 */ var RTCBrowserType = require("../../service/RTC/RTCBrowserType"); @@ -12002,7 +12211,7 @@ StatsCollector.prototype.processAudioLevelReport = function () }; -},{"../../service/RTC/RTCBrowserType":88}],46:[function(require,module,exports){ +},{"../../service/RTC/RTCBrowserType":90}],48:[function(require,module,exports){ /** * Created by hristo on 8/4/14. */ @@ -12135,7 +12344,7 @@ var statistics = module.exports = statistics; -},{"../../service/RTC/StreamEventTypes.js":91,"../../service/xmpp/XMPPEvents":97,"./LocalStatsCollector.js":44,"./RTPStatsCollector.js":45,"events":98}],47:[function(require,module,exports){ +},{"../../service/RTC/StreamEventTypes.js":93,"../../service/xmpp/XMPPEvents":100,"./LocalStatsCollector.js":46,"./RTPStatsCollector.js":47,"events":101}],49:[function(require,module,exports){ var i18n = require("i18next-client"); var languages = require("../../service/translation/languages"); var Settings = require("../settings/Settings"); @@ -12269,7 +12478,7 @@ module.exports = { } }; -},{"../../service/translation/languages":96,"../settings/Settings":38,"i18next-client":62}],48:[function(require,module,exports){ +},{"../../service/translation/languages":99,"../settings/Settings":40,"i18next-client":64}],50:[function(require,module,exports){ /* jshint -W117 */ var TraceablePeerConnection = require("./TraceablePeerConnection"); var SDPDiffer = require("./SDPDiffer"); @@ -13610,7 +13819,7 @@ JingleSession.prototype.remoteStreamAdded = function (data, times) { module.exports = JingleSession; -},{"../../service/RTC/RTCBrowserType":88,"./SDP":49,"./SDPDiffer":50,"./SDPUtil":51,"./TraceablePeerConnection":52}],49:[function(require,module,exports){ +},{"../../service/RTC/RTCBrowserType":90,"./SDP":51,"./SDPDiffer":52,"./SDPUtil":53,"./TraceablePeerConnection":54}],51:[function(require,module,exports){ /* jshint -W117 */ var SDPUtil = require("./SDPUtil"); @@ -14232,7 +14441,7 @@ SDP.prototype.jingle2media = function (content) { module.exports = SDP; -},{"./SDPUtil":51}],50:[function(require,module,exports){ +},{"./SDPUtil":53}],52:[function(require,module,exports){ function SDPDiffer(mySDP, otherSDP) { this.mySDP = mySDP; this.otherSDP = otherSDP; @@ -14398,7 +14607,7 @@ SDPDiffer.prototype.toJingle = function(modify) { }; module.exports = SDPDiffer; -},{}],51:[function(require,module,exports){ +},{}],53:[function(require,module,exports){ SDPUtil = { iceparams: function (mediadesc, sessiondesc) { var data = null; @@ -14748,7 +14957,7 @@ SDPUtil = { } }; module.exports = SDPUtil; -},{}],52:[function(require,module,exports){ +},{}],54:[function(require,module,exports){ function TraceablePeerConnection(ice_config, constraints) { var self = this; var RTCPeerconnection = navigator.mozGetUserMedia ? mozRTCPeerConnection : webkitRTCPeerConnection; @@ -15068,7 +15277,7 @@ TraceablePeerConnection.prototype.getStats = function(callback, errback) { module.exports = TraceablePeerConnection; -},{"sdp-interop":80}],53:[function(require,module,exports){ +},{"sdp-interop":82}],55:[function(require,module,exports){ /* global $, $iq, APP, config, connection, UI, messageHandler, roomName, sessionTerminated, Strophe, Util */ var XMPPEvents = require("../../service/xmpp/XMPPEvents"); @@ -15156,7 +15365,7 @@ var Moderator = { } }, - onMucLeft: function (jid) { + onMucMemberLeft: function (jid) { console.info("Someone left is it focus ? " + jid); var resource = Strophe.getResourceFromJid(jid); if (resource === 'focus' && !this.xmppService.sessionTerminated) { @@ -15486,7 +15695,7 @@ module.exports = Moderator; -},{"../../service/authentication/AuthenticationEvents":93,"../../service/xmpp/XMPPEvents":97,"../settings/Settings":38}],54:[function(require,module,exports){ +},{"../../service/authentication/AuthenticationEvents":95,"../../service/xmpp/XMPPEvents":100,"../settings/Settings":40}],56:[function(require,module,exports){ /* global $, $iq, config, connection, focusMucJid, messageHandler, Moderator, Toolbar, Util */ var Moderator = require("./moderator"); @@ -15642,7 +15851,7 @@ var Recording = { } module.exports = Recording; -},{"./moderator":53}],55:[function(require,module,exports){ +},{"./moderator":55}],57:[function(require,module,exports){ /* jshint -W117 */ /* a simple MUC connection plugin * can only handle a single MUC room @@ -15846,7 +16055,7 @@ module.exports = function(XMPP, eventEmitter) { if (this.role !== member.role) { this.role = member.role; - eventEmitter.emit(XMPPEvents.LOCALROLE_CHANGED, + eventEmitter.emit(XMPPEvents.LOCAL_ROLE_CHANGED, from, member, pres, Moderator.isModerator()); } if (!this.joined) { @@ -15869,7 +16078,7 @@ module.exports = function(XMPP, eventEmitter) { if (email.length > 0) { id = email.text(); } - eventEmitter.emit(XMPPEvents.MUC_ENTER, from, id, member.displayName); + eventEmitter.emit(XMPPEvents.MUC_MEMBER_JOINED, from, id, member.displayName); } } else { // Presence update for existing participant @@ -16233,7 +16442,7 @@ module.exports = function(XMPP, eventEmitter) { }, onParticipantLeft: function (jid) { - eventEmitter.emit(XMPPEvents.MUC_LEFT, jid); + eventEmitter.emit(XMPPEvents.MUC_MEMBER_LEFT, jid); this.connection.jingle.terminateByJid(jid); @@ -16242,7 +16451,7 @@ module.exports = function(XMPP, eventEmitter) { [jid, this.getPrezi(jid)]); } - Moderator.onMucLeft(jid); + Moderator.onMucMemberLeft(jid); }, parsePresence: function (from, memeber, pres) { if($(pres).find(">bridgeIsDown").length > 0 && !bridgeIsDown) { @@ -16277,7 +16486,7 @@ module.exports = function(XMPP, eventEmitter) { }); - eventEmitter.emit(XMPPEvents.CHANGED_STREAMS, from, changedStreams); + eventEmitter.emit(XMPPEvents.STREAMS_CHANGED, from, changedStreams); var displayName = !config.displayJids ? memeber.displayName : Strophe.getResourceFromJid(from); @@ -16300,7 +16509,7 @@ module.exports = function(XMPP, eventEmitter) { }; -},{"../../service/xmpp/XMPPEvents":97,"./JingleSession":48,"./moderator":53}],56:[function(require,module,exports){ +},{"../../service/xmpp/XMPPEvents":100,"./JingleSession":50,"./moderator":55}],58:[function(require,module,exports){ /* jshint -W117 */ var JingleSession = require("./JingleSession"); @@ -16639,7 +16848,7 @@ module.exports = function(XMPP, eventEmitter) }; -},{"../../service/xmpp/XMPPEvents":97,"./JingleSession":48}],57:[function(require,module,exports){ +},{"../../service/xmpp/XMPPEvents":100,"./JingleSession":50}],59:[function(require,module,exports){ /* global Strophe */ module.exports = function () { @@ -16660,7 +16869,7 @@ module.exports = function () { } }); }; -},{}],58:[function(require,module,exports){ +},{}],60:[function(require,module,exports){ /* global $, $iq, config, connection, focusMucJid, forceMuted, setAudioMuted, Strophe */ /** @@ -16719,7 +16928,7 @@ module.exports = function (XMPP) { } }); } -},{}],59:[function(require,module,exports){ +},{}],61:[function(require,module,exports){ /* jshint -W117 */ module.exports = function() { Strophe.addConnectionPlugin('rayo', @@ -16816,7 +17025,7 @@ module.exports = function() { ); }; -},{}],60:[function(require,module,exports){ +},{}],62:[function(require,module,exports){ /** * Strophe logger implementation. Logs from level WARN and above. */ @@ -16860,7 +17069,7 @@ module.exports = function () { }; }; -},{}],61:[function(require,module,exports){ +},{}],63:[function(require,module,exports){ /* global $, APP, config, Strophe*/ var Moderator = require("./moderator"); var EventEmitter = require("events"); @@ -17005,6 +17214,7 @@ function setupEvents() { } var XMPP = { + getConnection: function(){ return connection; }, sessionTerminated: false, /** @@ -17359,7 +17569,7 @@ var XMPP = { module.exports = XMPP; -},{"../../service/RTC/RTCEvents":89,"../../service/RTC/StreamEventTypes":91,"../../service/UI/UIEvents":92,"../../service/xmpp/XMPPEvents":97,"../settings/Settings":38,"./SDP":49,"./moderator":53,"./recording":54,"./strophe.emuc":55,"./strophe.jingle":56,"./strophe.logger":57,"./strophe.moderate":58,"./strophe.rayo":59,"./strophe.util":60,"events":98,"pako":63}],62:[function(require,module,exports){ +},{"../../service/RTC/RTCEvents":91,"../../service/RTC/StreamEventTypes":93,"../../service/UI/UIEvents":94,"../../service/xmpp/XMPPEvents":100,"../settings/Settings":40,"./SDP":51,"./moderator":55,"./recording":56,"./strophe.emuc":57,"./strophe.jingle":58,"./strophe.logger":59,"./strophe.moderate":60,"./strophe.rayo":61,"./strophe.util":62,"events":101,"pako":65}],64:[function(require,module,exports){ // i18next, v1.7.7 // Copyright (c)2014 Jan Mühlemann (jamuhl). // Distributed under MIT license @@ -19482,7 +19692,7 @@ module.exports = XMPP; i18n.options = o; })(); -},{"jquery":"jquery"}],63:[function(require,module,exports){ +},{"jquery":"jquery"}],65:[function(require,module,exports){ // Top level file is just a mixin of submodules & constants 'use strict'; @@ -19497,7 +19707,7 @@ var pako = {}; assign(pako, deflate, inflate, constants); module.exports = pako; -},{"./lib/deflate":64,"./lib/inflate":65,"./lib/utils/common":66,"./lib/zlib/constants":69}],64:[function(require,module,exports){ +},{"./lib/deflate":66,"./lib/inflate":67,"./lib/utils/common":68,"./lib/zlib/constants":71}],66:[function(require,module,exports){ 'use strict'; @@ -19862,7 +20072,7 @@ exports.Deflate = Deflate; exports.deflate = deflate; exports.deflateRaw = deflateRaw; exports.gzip = gzip; -},{"./utils/common":66,"./utils/strings":67,"./zlib/deflate.js":71,"./zlib/messages":76,"./zlib/zstream":78}],65:[function(require,module,exports){ +},{"./utils/common":68,"./utils/strings":69,"./zlib/deflate.js":73,"./zlib/messages":78,"./zlib/zstream":80}],67:[function(require,module,exports){ 'use strict'; @@ -20231,7 +20441,7 @@ exports.inflate = inflate; exports.inflateRaw = inflateRaw; exports.ungzip = inflate; -},{"./utils/common":66,"./utils/strings":67,"./zlib/constants":69,"./zlib/gzheader":72,"./zlib/inflate.js":74,"./zlib/messages":76,"./zlib/zstream":78}],66:[function(require,module,exports){ +},{"./utils/common":68,"./utils/strings":69,"./zlib/constants":71,"./zlib/gzheader":74,"./zlib/inflate.js":76,"./zlib/messages":78,"./zlib/zstream":80}],68:[function(require,module,exports){ 'use strict'; @@ -20334,7 +20544,7 @@ exports.setTyped = function (on) { }; exports.setTyped(TYPED_OK); -},{}],67:[function(require,module,exports){ +},{}],69:[function(require,module,exports){ // String encode/decode helpers 'use strict'; @@ -20521,7 +20731,7 @@ exports.utf8border = function(buf, max) { return (pos + _utf8len[buf[pos]] > max) ? pos : max; }; -},{"./common":66}],68:[function(require,module,exports){ +},{"./common":68}],70:[function(require,module,exports){ 'use strict'; // Note: adler32 takes 12% for level 0 and 2% for level 6. @@ -20554,7 +20764,7 @@ function adler32(adler, buf, len, pos) { module.exports = adler32; -},{}],69:[function(require,module,exports){ +},{}],71:[function(require,module,exports){ module.exports = { /* Allowed flush values; see deflate() and inflate() below for details */ @@ -20602,7 +20812,7 @@ module.exports = { Z_DEFLATED: 8 //Z_NULL: null // Use -1 or null inline, depending on var type }; -},{}],70:[function(require,module,exports){ +},{}],72:[function(require,module,exports){ 'use strict'; // Note: we can't get significant speed boost here. @@ -20644,7 +20854,7 @@ function crc32(crc, buf, len, pos) { module.exports = crc32; -},{}],71:[function(require,module,exports){ +},{}],73:[function(require,module,exports){ 'use strict'; var utils = require('../utils/common'); @@ -22410,7 +22620,7 @@ exports.deflatePending = deflatePending; exports.deflatePrime = deflatePrime; exports.deflateTune = deflateTune; */ -},{"../utils/common":66,"./adler32":68,"./crc32":70,"./messages":76,"./trees":77}],72:[function(require,module,exports){ +},{"../utils/common":68,"./adler32":70,"./crc32":72,"./messages":78,"./trees":79}],74:[function(require,module,exports){ 'use strict'; @@ -22451,7 +22661,7 @@ function GZheader() { } module.exports = GZheader; -},{}],73:[function(require,module,exports){ +},{}],75:[function(require,module,exports){ 'use strict'; // See state defs from inflate.js @@ -22778,7 +22988,7 @@ module.exports = function inflate_fast(strm, start) { return; }; -},{}],74:[function(require,module,exports){ +},{}],76:[function(require,module,exports){ 'use strict'; @@ -24282,7 +24492,7 @@ exports.inflateSync = inflateSync; exports.inflateSyncPoint = inflateSyncPoint; exports.inflateUndermine = inflateUndermine; */ -},{"../utils/common":66,"./adler32":68,"./crc32":70,"./inffast":73,"./inftrees":75}],75:[function(require,module,exports){ +},{"../utils/common":68,"./adler32":70,"./crc32":72,"./inffast":75,"./inftrees":77}],77:[function(require,module,exports){ 'use strict'; @@ -24609,7 +24819,7 @@ module.exports = function inflate_table(type, lens, lens_index, codes, table, ta return 0; }; -},{"../utils/common":66}],76:[function(require,module,exports){ +},{"../utils/common":68}],78:[function(require,module,exports){ 'use strict'; module.exports = { @@ -24623,7 +24833,7 @@ module.exports = { '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ }; -},{}],77:[function(require,module,exports){ +},{}],79:[function(require,module,exports){ 'use strict'; @@ -25823,7 +26033,7 @@ exports._tr_stored_block = _tr_stored_block; exports._tr_flush_block = _tr_flush_block; exports._tr_tally = _tr_tally; exports._tr_align = _tr_align; -},{"../utils/common":66}],78:[function(require,module,exports){ +},{"../utils/common":68}],80:[function(require,module,exports){ 'use strict'; @@ -25853,7 +26063,7 @@ function ZStream() { } module.exports = ZStream; -},{}],79:[function(require,module,exports){ +},{}],81:[function(require,module,exports){ module.exports = function arrayEquals(array) { // if the other array is a falsy value, return if (!array) @@ -25879,10 +26089,10 @@ module.exports = function arrayEquals(array) { } -},{}],80:[function(require,module,exports){ +},{}],82:[function(require,module,exports){ exports.Interop = require('./interop'); -},{"./interop":81}],81:[function(require,module,exports){ +},{"./interop":83}],83:[function(require,module,exports){ var transform = require('./transform'); var arrayEquals = require('./array-equals'); @@ -25929,8 +26139,8 @@ Interop.prototype.toPlanB = function(desc) { // Try some heuristics to "make sure" this is a Plan A SDP. Plan B SDP has // a video, an audio and a data "channel" at most. if (session.media.length <= 3 && session.media.every(function(m) { - return ['video', 'audio', 'data'].indexOf(m.mid) !== -1; - })) { + return ['video', 'audio', 'data'].indexOf(m.mid) !== -1; + })) { console.warn('This description does not look like Plan A.'); return desc; } @@ -25975,8 +26185,6 @@ Interop.prototype.toPlanB = function(desc) { // Add sources to the channel and handle a=msid. if (typeof mLine.sources === 'object') { Object.keys(mLine.sources).forEach(function(ssrc) { - if (typeof channels[mLine.type].sources !== 'object') - channels[mLine.type].sources = { } // Assign the sources to the channel. channels[mLine.type].sources[ssrc] = mLine.sources[ssrc]; @@ -25991,11 +26199,11 @@ Interop.prototype.toPlanB = function(desc) { // Add ssrc groups to the channel. if (typeof mLine.ssrcGroups !== 'undefined' && - Array.isArray(mLine.ssrcGroups)) { + Array.isArray(mLine.ssrcGroups)) { // Create the ssrcGroups array, if it's not defined. if (typeof channel.ssrcGroups === 'undefined' || - !Array.isArray(channel.ssrcGroups)) { + !Array.isArray(channel.ssrcGroups)) { channel.ssrcGroups = []; } @@ -26081,8 +26289,8 @@ Interop.prototype.toPlanA = function(desc) { // Try some heuristics to "make sure" this is a Plan B SDP. Plan B SDP has // a video, an audio and a data "channel" at most. if (session.media.length > 3 || !session.media.every(function(m) { - return ['video', 'audio', 'data'].indexOf(m.mid) !== -1; - })) { + return ['video', 'audio', 'data'].indexOf(m.mid) !== -1; + })) { console.warn('This description does not look like Plan B.'); return desc; } @@ -26222,65 +26430,65 @@ Interop.prototype.toPlanA = function(desc) { mLine.sources[ssrc] = sources[ssrc]; delete sources[ssrc].msid; } else { - // Use the "channel" as a prototype for the "mLine". - mLine = Object.create(channel); - mLines[ssrc] = mLine; + // Use the "channel" as a prototype for the "mLine". + mLine = Object.create(channel); + mLines[ssrc] = mLine; - // Assign the msid of the source to the m-line. - mLine.msid = sources[ssrc].msid; - delete sources[ssrc].msid; + // Assign the msid of the source to the m-line. + mLine.msid = sources[ssrc].msid; + delete sources[ssrc].msid; - // We assign one SSRC per media line. - mLine.sources = {}; - mLine.sources[ssrc] = sources[ssrc]; - mLine.ssrcGroups = invertedGroups[ssrc]; + // We assign one SSRC per media line. + mLine.sources = {}; + mLine.sources[ssrc] = sources[ssrc]; + mLine.ssrcGroups = invertedGroups[ssrc]; - // Use the cached Plan A SDP (if it exists) to assign SSRCs to - // mids. - if (typeof cached !== 'undefined' && - typeof cached.media !== 'undefined' && - Array.isArray(cached.media)) { + // Use the cached Plan A SDP (if it exists) to assign SSRCs to + // mids. + if (typeof cached !== 'undefined' && + typeof cached.media !== 'undefined' && + Array.isArray(cached.media)) { - cached.media.forEach(function(m) { - if (typeof m.sources === 'object') { - Object.keys(m.sources).forEach(function(s) { - if (s === ssrc) { - mLine.mid = m.mid; - } - }); - } - }); - } - - if (typeof mLine.mid === 'undefined') { - - // If this is an SSRC that we see for the first time assign - // it a new mid. This is typically the case when this - // method is called to transform a remote description for - // the first time or when there is a new SSRC in the remote - // description because a new peer has joined the - // conference. Local SSRCs should have already been added - // to the map in the toPlanB method. - // - // Because FF generates answers in Plan A style, we MUST - // already have a cached answer with all the local SSRCs - // mapped to some mLine/mid. - - if (desc.type === 'answer') { - throw new Error("An unmapped SSRC was found."); + cached.media.forEach(function(m) { + if (typeof m.sources === 'object') { + Object.keys(m.sources).forEach(function(s) { + if (s === ssrc) { + mLine.mid = m.mid; + } + }); } + }); + } - mLine.mid = [channel.type, '-', ssrc].join(''); + if (typeof mLine.mid === 'undefined') { + + // If this is an SSRC that we see for the first time assign + // it a new mid. This is typically the case when this + // method is called to transform a remote description for + // the first time or when there is a new SSRC in the remote + // description because a new peer has joined the + // conference. Local SSRCs should have already been added + // to the map in the toPlanB method. + // + // Because FF generates answers in Plan A style, we MUST + // already have a cached answer with all the local SSRCs + // mapped to some mLine/mid. + + if (desc.type === 'answer') { + throw new Error("An unmapped SSRC was found."); } - // Include the candidates in the 1st media line. - mLine.candidates = candidates; - mLine.iceUfrag = iceUfrag; - mLine.icePwd = icePwd; - mLine.fingerprint = fingerprint; - mLine.port = port; + mLine.mid = [channel.type, '-', ssrc].join(''); + } - media[mLine.mid] = mLine; + // Include the candidates in the 1st media line. + mLine.candidates = candidates; + mLine.iceUfrag = iceUfrag; + mLine.icePwd = icePwd; + mLine.fingerprint = fingerprint; + mLine.port = port; + + media[mLine.mid] = mLine; } }); } @@ -26300,7 +26508,7 @@ Interop.prototype.toPlanA = function(desc) { if (typeof cache['offer'] === 'undefined') { throw new Error("An answer is being processed but we couldn't " + - "find a cached offer."); + "find a cached offer."); } var cachedOffer = transform.parse(cache['offer']); @@ -26308,8 +26516,8 @@ Interop.prototype.toPlanA = function(desc) { if (typeof cachedOffer === 'undefined' || typeof cachedOffer.media === 'undefined' || !Array.isArray(cachedOffer.media)) { - // FIXME(gp) is this really a problem in the general case? - throw new Error("The cached offer has no media."); + // FIXME(gp) is this really a problem in the general case? + throw new Error("The cached offer has no media."); } cachedOffer.media.forEach(function(mo) { @@ -26317,20 +26525,12 @@ Interop.prototype.toPlanA = function(desc) { var mLine; if (typeof media[mo.mid] === 'undefined') { - // This is either an m-line containing a remote track only or - // an m-line containing a remote track and a local track that - // has been removed. + // This is probably an m-line containing a remote track only. // It MUST exist in the cached answer as a remote track only // mLine. cached.media.every(function(ma) { if (mo.mid == ma.mid) { - // in case this is a removed local track clean-up the - // m-line and make sure it's 'recvonly'. - delete ma.msid; - delete ma.sources; - delete ma.ssrcGroups; - ma.direction = 'recvonly'; mLine = ma; return false; } else { @@ -26343,8 +26543,8 @@ Interop.prototype.toPlanA = function(desc) { if (typeof mLine === 'undefined') { throw new Error("The cached offer contains an m-line that " + - "doesn't exist neither in the cached answer nor in " + - "the converted answer."); + "doesn't exist neither in the cached answer nor in " + + "the converted answer."); } session.media.push(mLine); @@ -26415,7 +26615,7 @@ Interop.prototype.toPlanA = function(desc) { //#endregion }; -},{"./array-equals":79,"./transform":82}],82:[function(require,module,exports){ +},{"./array-equals":81,"./transform":84}],84:[function(require,module,exports){ var transform = require('sdp-transform'); exports.write = function(session, opts) { @@ -26514,7 +26714,7 @@ exports.parse = function(sdp) { }; -},{"sdp-transform":84}],83:[function(require,module,exports){ +},{"sdp-transform":86}],85:[function(require,module,exports){ var grammar = module.exports = { v: [{ name: 'version', @@ -26759,7 +26959,7 @@ Object.keys(grammar).forEach(function (key) { }); }); -},{}],84:[function(require,module,exports){ +},{}],86:[function(require,module,exports){ var parser = require('./parser'); var writer = require('./writer'); @@ -26769,7 +26969,7 @@ exports.parseFmtpConfig = parser.parseFmtpConfig; exports.parsePayloads = parser.parsePayloads; exports.parseRemoteCandidates = parser.parseRemoteCandidates; -},{"./parser":85,"./writer":86}],85:[function(require,module,exports){ +},{"./parser":87,"./writer":88}],87:[function(require,module,exports){ var toIntIfInt = function (v) { return String(Number(v)) === v ? Number(v) : v; }; @@ -26864,7 +27064,7 @@ exports.parseRemoteCandidates = function (str) { return candidates; }; -},{"./grammar":83}],86:[function(require,module,exports){ +},{"./grammar":85}],88:[function(require,module,exports){ var grammar = require('./grammar'); // customized util.format - discards excess arguments and can void middle ones @@ -26980,14 +27180,14 @@ module.exports = function (session, opts) { return sdp.join('\r\n') + '\r\n'; }; -},{"./grammar":83}],87:[function(require,module,exports){ +},{"./grammar":85}],89:[function(require,module,exports){ var MediaStreamType = { VIDEO_TYPE: "Video", AUDIO_TYPE: "Audio" }; module.exports = MediaStreamType; -},{}],88:[function(require,module,exports){ +},{}],90:[function(require,module,exports){ var RTCBrowserType = { RTC_BROWSER_CHROME: "rtc_browser.chrome", @@ -26995,7 +27195,7 @@ var RTCBrowserType = { }; module.exports = RTCBrowserType; -},{}],89:[function(require,module,exports){ +},{}],91:[function(require,module,exports){ var RTCEvents = { LASTN_CHANGED: "rtc.lastn_changed", DOMINANTSPEAKER_CHANGED: "rtc.dominantspeaker_changed", @@ -27008,7 +27208,7 @@ var RTCEvents = { }; module.exports = RTCEvents; -},{}],90:[function(require,module,exports){ +},{}],92:[function(require,module,exports){ var Resolutions = { "1080": { width: 1920, @@ -27062,7 +27262,7 @@ var Resolutions = { } }; module.exports = Resolutions; -},{}],91:[function(require,module,exports){ +},{}],93:[function(require,module,exports){ var StreamEventTypes = { EVENT_TYPE_LOCAL_CREATED: "stream.local_created", @@ -27078,14 +27278,14 @@ var StreamEventTypes = { }; module.exports = StreamEventTypes; -},{}],92:[function(require,module,exports){ +},{}],94:[function(require,module,exports){ var UIEvents = { NICKNAME_CHANGED: "UI.nickname_changed", SELECTED_ENDPOINT: "UI.selected_endpoint", PINNED_ENDPOINT: "UI.pinned_endpoint" }; module.exports = UIEvents; -},{}],93:[function(require,module,exports){ +},{}],95:[function(require,module,exports){ var AuthenticationEvents = { /** * Event callback arguments: @@ -27099,7 +27299,7 @@ var AuthenticationEvents = { }; module.exports = AuthenticationEvents; -},{}],94:[function(require,module,exports){ +},{}],96:[function(require,module,exports){ var CQEvents = { LOCALSTATS_UPDATED: "cq.localstats_updated", REMOTESTATS_UPDATED: "cq.remotestats_updated", @@ -27107,7 +27307,7 @@ var CQEvents = { }; module.exports = CQEvents; -},{}],95:[function(require,module,exports){ +},{}],97:[function(require,module,exports){ var DesktopSharingEventTypes = { INIT: "ds.init", @@ -27117,7 +27317,14 @@ var DesktopSharingEventTypes = { }; module.exports = DesktopSharingEventTypes; -},{}],96:[function(require,module,exports){ +},{}],98:[function(require,module,exports){ +var Events = { + DTMF_SUPPORT_CHANGED: "members.dtmf_support_changed" +}; + +module.exports = Events; + +},{}],99:[function(require,module,exports){ module.exports = { getLanguages : function () { var languages = []; @@ -27133,25 +27340,28 @@ module.exports = { DE: "de", TR: "tr" } -},{}],97:[function(require,module,exports){ +},{}],100:[function(require,module,exports){ var XMPPEvents = { - CONFERENCE_CERATED: "xmpp.conferenceCreated.jingle", + CONFERENCE_CREATED: "xmpp.conferenceCreated.jingle", CALL_TERMINATED: "xmpp.callterminated.jingle", CALL_INCOMING: "xmpp.callincoming.jingle", - DISPOSE_CONFERENCE: "xmpp.dispoce_confernce", + DISPOSE_CONFERENCE: "xmpp.dispose_conference", GRACEFUL_SHUTDOWN: "xmpp.graceful_shutdown", KICKED: "xmpp.kicked", BRIDGE_DOWN: "xmpp.bridge_down", USER_ID_CHANGED: "xmpp.user_id_changed", - CHANGED_STREAMS: "xmpp.changed_streams", + STREAMS_CHANGED: "xmpp.streams_changed", + // We joined the MUC MUC_JOINED: "xmpp.muc_joined", - MUC_ENTER: "xmpp.muc_enter", + // A member joined the MUC + MUC_MEMBER_JOINED: "xmpp.muc_member_joined", + // A member left the MUC + MUC_MEMBER_LEFT: "xmpp.muc_member_left", MUC_ROLE_CHANGED: "xmpp.muc_role_changed", - MUC_LEFT: "xmpp.muc_left", MUC_DESTROYED: "xmpp.muc_destroyed", DISPLAY_NAME_CHANGED: "xmpp.display_name_changed", REMOTE_STATS: "xmpp.remote_stats", - LOCALROLE_CHANGED: "xmpp.localrole_changed", + LOCAL_ROLE_CHANGED: "xmpp.localrole_changed", PRESENCE_STATUS: "xmpp.presence_status", RESERVATION_ERROR: "xmpp.room_reservation_error", SUBJECT_CHANGED: "xmpp.subject_changed", @@ -27164,7 +27374,7 @@ var XMPPEvents = { DEVICE_AVAILABLE: "xmpp.device_available" }; module.exports = XMPPEvents; -},{}],98:[function(require,module,exports){ +},{}],101:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a