diff --git a/html5/verto/verto_communicator/src/partials/chat.html b/html5/verto/verto_communicator/src/partials/chat.html index 23797d0b51..81eaf12912 100644 --- a/html5/verto/verto_communicator/src/partials/chat.html +++ b/html5/verto/verto_communicator/src/partials/chat.html @@ -99,6 +99,24 @@ Transfer +
  • + + + Canvas In + +
  • +
  • + + + Canvas Out + +
  • +
  • + + + Layer + +
  • diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/ChatController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/ChatController.js index 99c6359c96..1e725857d2 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/ChatController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/ChatController.js @@ -196,6 +196,41 @@ }); }; + $scope.confCanvasIn = function(memberID, canvasID) { + if (canvasID) { + verto.setCanvasIn(memberID, canvasID); + return; + } + + shortPrompt('Please insert the Canvas Id', function(canvasID) { + console.log(memberID, canvasID); + verto.setCanvasIn(memberID, canvasID); + }); + + }; + + $scope.confCanvasOut = function(memberID, canvasID) { + if (canvasID) { + verto.setCanvasOut(memberID, canvasID); + return; + } + + shortPrompt('Please insert the Canvas Id', function(canvasID) { + verto.setCanvasOut(memberID, canvasID); + }); + }; + + $scope.confLayer = function(memberID, canvasID) { + if (canvasID) { + verto.setLayer(memberID, canvasID); + return; + } + + shortPrompt('Please insert the Layer', function(canvasID) { + verto.setLayer(memberID, canvasID); + }); + }; + $scope.confResetBanner = function(memberID) { console.log('$scope.confResetBanner'); var text = 'reset'; @@ -226,6 +261,19 @@ } }); }; + + function shortPrompt(text, cb) { + prompt({ + title: text, + input: true, + label: '', + value: '', + }).then(function(val) { + if (val && cb) { + cb(val); + } + }); + } } ]); diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/InCallController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/InCallController.js index 10887d3195..ab59171d85 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/InCallController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/InCallController.js @@ -81,12 +81,14 @@ }; $scope.confPopup = function(canvas_id) { + var video = document.getElementById('webcam'); 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 + var width = webcam.offsetWidth; + var height = webcam.offsetHeight + 100; + var x = (screen.width - width)/2 + var y = (screen.height - height)/2 s = s.replace(/\#.*/, ''); s += "#/?sessid=random&master=" + curCall + "&watcher=true&extension=" + extension+ "&canvas_id=" + canvas_id; diff --git a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js index 68ed52c4bc..480ccb13ac 100644 --- a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js +++ b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js @@ -919,6 +919,15 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora sendConferenceChat: function(message) { data.conf.sendChat(message, "message"); }, + setCanvasIn: function(memberID, canvasID) { + data.conf.modCommand('vid-canvas', memberID, canvasID); + }, + setCanvasOut: function(memberID, canvasID) { + data.conf.modCommand('vid-watching-canvas', memberID, canvasID); + }, + setLayer: function(memberID, canvasID) { + data.conf.modCommand('vid-layer', memberID, canvasID); + }, /* * Method is used to send user2user chats. * VC does not yet support that.