From 73c1eddc05757067911477f6cc00c545eddc19cb Mon Sep 17 00:00:00 2001 From: perroned Date: Wed, 13 Jan 2016 10:05:22 -0800 Subject: [PATCH] Updated parameters for initating verto calls. --- bigbluebutton-html5/app/client/verto.coffee | 32 ++++++++++++++++----- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/bigbluebutton-html5/app/client/verto.coffee b/bigbluebutton-html5/app/client/verto.coffee index 2f3a9a68e8..6e27051185 100755 --- a/bigbluebutton-html5/app/client/verto.coffee +++ b/bigbluebutton-html5/app/client/verto.coffee @@ -11,8 +11,10 @@ Template.vertoDeskshareMenu.events $("#webcam").src = null; window["deskshareStream"].stop(); else - screenStart(false, (->)) + setInSession("sharingMyScreen", false) + console.log("Hiding screenshare"); simulatePresenterDeskshareHasEnded(); + endScreenshare((->), (->)) "click #installChromeExtension": (event) -> # do a check for Chrome desksharing extension @@ -42,20 +44,36 @@ Handlebars.registerHelper "browserIs", (name) -> name is getBrowserName() Template.deskshareModal.events + # the user wants to present their screen "click .screenshareStart": (event) -> $("#deskshareModal").foundation('reveal', 'close') - screenStart(true, ((m)-> console.log(m)), "webcam") + success = -> + setInSession("sharingMyScreen", true) + # simulatePresenterDeskshareHasStarted() + fail = -> + setInSession("sharingMyScreen", false) + vertoServerCredentials = { + vertoPort: "8082", + hostName: Meteor.config.vertoServerAddress, + login: "1008", + password: Meteor.config.freeswitchProfilePassword, + } + startScreenshare(((m)-> console.log(m)), "webcam", vertoServerCredentials, Meteor.config.deskshareExtensionKey, success, fail) + # the user is the presenter sharing their screen and wishes to stop "click .screenshareStop": (event) -> $("#deskshareModal").foundation('reveal', 'close') - screenStart(false, (->)) + setInSession("sharingMyScreen", false) + console.log("sending signal to end deskshare"); + simulatePresenterDeskshareHasEnded() + endScreenshare((->), (->)) "click #desksharePreview": (event) -> success = -> toggleWhiteboardVideo("video") setInSession("isPreviewingDeskshare", true) notification_desksharePreview() - doDesksharePreview((-> success()), (->), "webcam"); + doDesksharePreview((-> success()), (->), "webcam", Meteor.config.deskshareExtensionKey); "click #stopDesksharePreview": (event) -> toggleWhiteboardVideo("whiteboard"); @@ -92,7 +110,7 @@ Template.webcamModal.events $("#webcamStop").hide() "click #webcamPreview": (event) -> - doWebcamPreview((->), (->), "webcam"); + # doWebcamPreview((->), (->), "webcam"); "click #getAdjustedResolutions": (event) -> getAdjustedResolutions (result) -> @@ -116,7 +134,7 @@ Template.webcamModal.events # if remote deskshare has been started connect and display the video stream @presenterDeskshareHasStarted = -> - voiceBridge = extension = Meteor.Meetings.findOne().voiceConf + voiceBridge = extension = Meteor.Meetings.findOne().voiceConf toggleWhiteboardVideo("video") joinVoiceCall @, { watchOnly: true @@ -128,7 +146,7 @@ Template.webcamModal.events Meteor.call("simulatePresenterDeskshareHasStarted", BBB.getMeetingId(), "3500", BBB.getMyUserId()) @simulatePresenterDeskshareHasEnded = -> - Meteor.call("simulatePresenterDeskshareHasEnded", BBB.getMeetingId(), BBB.getMyUserId()) + Meteor.call("simulatePresenterDeskshareHasEnded", BBB.getMeetingId(), "3500", BBB.getMyUserId()) Handlebars.registerHelper "canIPresentDeskshare", -> Meteor.Users.findOne({userId: BBB.getMyUserId()})?.user.presenter and not Meteor.config.useSIPAudio