mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
FS-7800 [verto_communicator] - Added an option in user's hover buttons to open another canvas when canvasCount is higher than 1
This commit is contained in:
@@ -98,6 +98,11 @@
|
||||
});
|
||||
|
||||
$rootScope.$on('members.del', function(event, uuid) {
|
||||
if ($rootScope.watcher && $rootScope.master === uuid) {
|
||||
verto.hangup();
|
||||
window.close();
|
||||
}
|
||||
|
||||
$scope.$apply(function() {
|
||||
var memberIdx = findMemberByUUID(uuid);
|
||||
if (memberIdx != -1) {
|
||||
|
@@ -10,6 +10,15 @@
|
||||
|
||||
eventQueue.process();
|
||||
|
||||
if ($location.search().autocall) {
|
||||
$rootScope.dialpadNumber = $location.search().autocall;
|
||||
delete $location.search().autocall;
|
||||
call($rootScope.dialpadNumber);
|
||||
if($rootScope.watcher) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$scope.call_history = CallHistory.all();
|
||||
$scope.history_control = CallHistory.all_control();
|
||||
$scope.has_history = Object.keys($scope.call_history).length;
|
||||
@@ -32,11 +41,6 @@
|
||||
/**
|
||||
* fill dialpad via querystring [?autocall=\d+]
|
||||
*/
|
||||
if ($location.search().autocall) {
|
||||
$rootScope.dialpadNumber = $location.search().autocall;
|
||||
delete $location.search().autocall;
|
||||
call($rootScope.dialpadNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* fill in dialpad via config.json
|
||||
@@ -83,6 +87,13 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
if (extension.indexOf('-canvas-') != -1) {
|
||||
$rootScope.watcher = true;
|
||||
verto.call($rootScope.dialpadNumber, null, { useCamera: false, useMic: false, caller_id_name: null, userVariables: {}, caller_id_number: null, mirrorInput: false });
|
||||
$location.path('/incall');
|
||||
return;
|
||||
}
|
||||
|
||||
storage.data.mutedVideo = false;
|
||||
storage.data.mutedMic = false;
|
||||
|
||||
|
@@ -15,7 +15,6 @@
|
||||
$scope.dialpadTemplate = '';
|
||||
$scope.incall = true;
|
||||
|
||||
|
||||
if (storage.data.videoCall) {
|
||||
$scope.callTemplate = 'partials/video_call.html';
|
||||
}
|
||||
@@ -25,6 +24,7 @@
|
||||
if($scope.chatStatus) {
|
||||
$scope.openChat();
|
||||
}
|
||||
buildCanvasesData();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -80,6 +80,22 @@
|
||||
$rootScope.$emit('changedSpeaker', speakerId);
|
||||
};
|
||||
|
||||
$scope.confPopup = function(canvas_id) {
|
||||
var s = window.location.href;
|
||||
var curCall = verto.data.call.callID;
|
||||
var extension = verto.data.call.params.remote_caller_id_number;
|
||||
var width = 465, height = 360;
|
||||
var x = screen.width/2 - width/2
|
||||
var y = screen.height/2 - height/2
|
||||
|
||||
s = s.replace(/\#.*/, '');
|
||||
s += "#/?sessid=random&master=" + curCall + "&watcher=true&extension=" + extension+ "&canvas_id=" + canvas_id;
|
||||
|
||||
console.log("opening new window to " + s);
|
||||
var popup = window.open(s, "canvas_window_" + canvas_id, "toolbar=0,location=0,menubar=0,directories=0,width=" + width + ",height=" + height, + ',left=' + x + ',top=' + y);
|
||||
popup.moveTo(x, y);
|
||||
};
|
||||
|
||||
$scope.screenshare = function() {
|
||||
if(verto.data.shareCall) {
|
||||
verto.screenshareHangup();
|
||||
@@ -88,6 +104,14 @@
|
||||
verto.screenshare(storage.data.called_number);
|
||||
};
|
||||
|
||||
function buildCanvasesData() {
|
||||
$scope.conf = verto.data.conf.params.laData;
|
||||
$scope.canvases = [{ id: 1, name: 'Super Canvas' }];
|
||||
for (var i = 1; i < $scope.conf.canvasCount; i++) {
|
||||
$scope.canvases.push({ id: i+1, name: 'Canvas ' + (i+1) });
|
||||
}
|
||||
}
|
||||
|
||||
$scope.muteMic = verto.muteMic;
|
||||
$scope.muteVideo = verto.muteVideo;
|
||||
|
||||
|
@@ -8,6 +8,24 @@
|
||||
|
||||
console.debug('Executing MainController.');
|
||||
|
||||
$rootScope.master = $location.search().master;
|
||||
if ($location.search().watcher === 'true') {
|
||||
$rootScope.watcher = true;
|
||||
angular.element(document.body).addClass('watcher');
|
||||
var dialpad;
|
||||
var extension = dialpad = $location.search().extension;
|
||||
var canvasID = $location.search().canvas_id;
|
||||
|
||||
if (dialpad) {
|
||||
if (canvasID) {
|
||||
dialpad += '-canvas-' + canvasID;
|
||||
}
|
||||
$rootScope.extension = extension;
|
||||
$rootScope.canvasID = canvasID;
|
||||
$location.search().autocall = dialpad;
|
||||
}
|
||||
}
|
||||
|
||||
var myVideo = document.getElementById("webcam");
|
||||
$scope.verto = verto;
|
||||
$scope.storage = storage;
|
||||
@@ -432,6 +450,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($rootScope.watcher) {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
//var hangupCallback = function(v, hangup) {
|
||||
// if (hangup) {
|
||||
// $location.path('/dialpad');
|
||||
|
Reference in New Issue
Block a user