diff --git a/static/js/directives/presentation.js b/static/js/directives/presentation.js index e98413dd..2c401f54 100644 --- a/static/js/directives/presentation.js +++ b/static/js/directives/presentation.js @@ -245,7 +245,6 @@ define(['jquery', 'underscore', 'text!partials/presentation.html'], function($, // Updater function to bring in new calls. var updater = function(event, state, currentcall) { - console.log("XXX updater", event, state, currentcall); switch (state) { case "completed": case "connected": @@ -429,6 +428,14 @@ define(['jquery', 'underscore', 'text!partials/presentation.html'], function($, $($window).on("resize", function() { $scope.$emit("redrawPdf"); }); + + $scope.$watch("layout.main", function(newval, oldval) { + console.log("presentation main", newval); + if (newval && newval !== "presentation") { + $scope.hidePresentation(); + } + }); + }]; return { diff --git a/static/js/directives/screenshare.js b/static/js/directives/screenshare.js index 160c2e88..587b5b19 100644 --- a/static/js/directives/screenshare.js +++ b/static/js/directives/screenshare.js @@ -290,6 +290,13 @@ define(['jquery', 'underscore', 'text!partials/screenshare.html', 'text!partials } }); + $scope.$watch("layout.main", function(newval, oldval) { + console.log("screenshare main", newval); + if (newval && newval !== "screenshare") { + $scope.stopScreenshare(); + } + }); + }]; var compile = function(tElement, tAttr) {