mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-12 13:19:23 +00:00
Verto Communicator is a web interface built on top of Verto and AngularJS. Brought to you by Evolux Sistemas and FreeSWITCH team. :) FS-7795 - implements fullscreen menu and doubleclick function. FS-7795 - added chat icon on fullscreen video FS-7796 - fix missing tooltips in call icons FS-7796 - fix tooltip position FS-7798 - implements change login information in modal view FS-7828 - fix esc key bug when leave fullscren mode. Using css instead of javascript in fullscreen for elements manipulation. FS-7826 - fix chat sender id with name instead of extension FS-7831 - remove demo from title FS-7841 - fix compatibility verification FS-7842 - 'settings' data persistent FS-7859 - moved popup down FS-7827 - added screen share functionality FS-7857 - default name for source media FS-7879 - prompt before logout [incall] FS-7873 - querystring for autocall FS-7875 - persist login and password password FS-7877 - phone feature: hold, transfer, incoming, answer, decline, call direction in history FS-7878 - small devices FS-7881 - added modal dialog for contributors
88 lines
2.4 KiB
JavaScript
88 lines
2.4 KiB
JavaScript
'use strict';
|
|
|
|
/* Directives */
|
|
|
|
var vertoDirectives = angular.module('vertoDirectives', []);
|
|
|
|
/**
|
|
* To RTC work properly we need to give a <video> tag as soon as possible
|
|
* because it needs to attach the video and audio stream to the tag.
|
|
*
|
|
* This directive is responsible for moving the video tag from the body to
|
|
* the right place when a call start and move back to the body when the
|
|
* call ends. It also hides and display the tag when its convenient.
|
|
*/
|
|
vertoDirectives.directive('videoTag',
|
|
function() {
|
|
function link(scope, element, attrs) {
|
|
// Moving the video tag to the new place inside the incall page.
|
|
console.log('Moving the video to element.');
|
|
jQuery('video').removeClass('hide').appendTo(element);
|
|
jQuery('video').css('display','block');
|
|
scope.callActive();
|
|
|
|
element.on('$destroy', function() {
|
|
// Move the video back to the body.
|
|
console.log('Moving the video back to body.');
|
|
jQuery('video').addClass('hide').appendTo(jQuery('body'));
|
|
});
|
|
}
|
|
|
|
return {
|
|
link: link
|
|
}
|
|
});
|
|
|
|
vertoDirectives.directive('userStatus',
|
|
function() {
|
|
var link = function(scope, element, attrs) {
|
|
scope.$watch('condition', function(condition) {
|
|
element.removeClass('connected');
|
|
element.removeClass('disconnected');
|
|
element.removeClass('connecting');
|
|
|
|
element.addClass(condition);
|
|
|
|
});
|
|
}
|
|
|
|
return {
|
|
scope: {
|
|
'condition': '='
|
|
},
|
|
link: link
|
|
};
|
|
|
|
});
|
|
|
|
vertoDirectives.directive('showControls',
|
|
function(Fullscreen) {
|
|
var link = function(scope, element, attrs) {
|
|
var i = null;
|
|
jQuery('.video-footer').fadeIn('slow');
|
|
jQuery('.video-hover-buttons').fadeIn('slow');
|
|
element.parent().bind('mousemove', function() {
|
|
if(Fullscreen.isEnabled()) {
|
|
clearTimeout(i);
|
|
jQuery('.video-footer').fadeIn('slow');
|
|
jQuery('.video-hover-buttons').fadeIn(500);
|
|
i = setTimeout(function () {
|
|
if(Fullscreen.isEnabled()) {
|
|
jQuery('.video-footer').fadeOut('slow');
|
|
jQuery('.video-hover-buttons').fadeOut(500);
|
|
}
|
|
}, 3000);
|
|
}
|
|
});
|
|
element.parent().bind('mouseleave', function () {
|
|
jQuery('.video-footer').fadeIn();
|
|
jQuery('.video-hover-buttons').fadeIn();
|
|
});
|
|
}
|
|
|
|
|
|
return {
|
|
link: link
|
|
};
|
|
});
|