FS-8222 [verto_communicator] updated getScreenId.js in order to detect plugin issues and attached an 'ended' event to screenshare stream in order to detect 'stop sharing' click

This commit is contained in:
Jaon EarlWolf
2015-10-28 15:35:25 -03:00
parent 9edede6c08
commit 43cb965f7e
4 changed files with 207 additions and 38 deletions

View File

@@ -19,7 +19,7 @@
if (storage.data.videoCall) {
$scope.callTemplate = 'partials/video_call.html';
}
$rootScope.$on('call.conference', function(event, data) {
$timeout(function() {
if($scope.chatStatus) {
@@ -75,9 +75,31 @@
verto.data.conf.setVideoLayout(layout);
};
$scope.screenshare = function() {
if(verto.data.shareCall) {
verto.screenshareHangup();
return false;
}
verto.screenshare(storage.data.called_number);
};
$scope.muteMic = verto.muteMic;
$scope.muteVideo = verto.muteVideo;
$scope.$on('ScreenShareExtensionStatus', function(error) {
switch(error) {
case 'permission-denied':
toastr.info('Please allow the plugin in order to use Screen Share', 'Error'); break;
case 'not-installed':
toastr.warning('Please install the plugin in order to use Screen Share', 'Warning'); break;
case 'installed-disabled':
toastr.info('Please enable the plugin in order to use Screen Share', 'Error'); break;
// case 'not-chrome'
// toastr.info('Please allow the plugin in order to use Screen Share', 'Error');
}
});
$timeout(function() {
console.log('broadcast time-start incall');
$scope.$broadcast('timer-start');

View File

@@ -24,13 +24,13 @@
* @type {string}
*/
$rootScope.dialpadNumber = '';
// If verto is not connected, redirects to login page.
if (!verto.data.connected) {
console.debug('MainController: WebSocket not connected. Redirecting to login.');
$location.path('/');
}
$rootScope.$on('config.http.success', function(ev) {
$scope.login(false);
});
@@ -58,7 +58,7 @@
}
});
};
verto.data.connecting = true;
verto.connect(connectCallback);
};
@@ -135,7 +135,7 @@
templateUrl: templateUrl,
controller: controller,
};
angular.extend(options, _options);
var modalInstance = $modal.open(options);
@@ -154,7 +154,7 @@
jQuery.material.init();
}
);
return modalInstance;
};
@@ -454,14 +454,6 @@
$scope.incomingCall = false;
};
$scope.screenshare = function() {
if (verto.data.shareCall) {
verto.screenshareHangup();
return false;
}
verto.screenshare(storage.data.called_number);
};
$scope.play = function() {
var file = $scope.promptInput('Please, enter filename', '', 'File',
function(file) {