Esempio n. 1
0
            function onIncomingCall(eventData) {
                if (this.appSettings.get('notification')) {
                    var myNotification = new Notify('Incoming Call From', {
                        icon: 'famous-time/content/ios_icon_x144.png',
                        body: eventData.get('firstname') + ' ' + eventData.get('lastname'),
                        notifyShow: onShowNotification.bind(this),
                        notifyClose: onCloseNotification.bind(this),
                        notifyClick: onClickNotification.bind(this)
                    });
                    function onShowNotification() {
                    }
                    function onCloseNotification() {
                        parent.focus();
                    }
                    function onClickNotification() {
                        parent.focus();
                    }
                    myNotification.show();
                }

                var curView = myLightbox.nodes[0].get();
                if (curView instanceof IncomingCallView || curView instanceof ConnectedCallView)
                    return;
                if (curView instanceof OutgoingCallView) {
                    outgoingCallView.accept();
                    this.eventOutput.emit('incomingCallAnswer', eventData);
                }
                else {
                    incomingCallView.start(eventData);
                    myLightbox.show(incomingCallView, true);
                }
            }
Esempio n. 2
0
 function onOutGoingCallAccept() {
     outgoingCallView.accept();
 }