From 497795008135df73b78f855324c91d808834496e Mon Sep 17 00:00:00 2001 From: perroned Date: Mon, 30 May 2016 17:21:30 +0000 Subject: [PATCH 01/27] Fixes crash when starting video view --- .../resources/prod/lib/verto_extension.js | 39 +++++++------------ .../ui/components/deskshare/service.js | 7 ++-- 2 files changed, 18 insertions(+), 28 deletions(-) diff --git a/bigbluebutton-client/resources/prod/lib/verto_extension.js b/bigbluebutton-client/resources/prod/lib/verto_extension.js index 8a7673bf23..9114d15075 100755 --- a/bigbluebutton-client/resources/prod/lib/verto_extension.js +++ b/bigbluebutton-client/resources/prod/lib/verto_extension.js @@ -154,8 +154,20 @@ docall_verto = function(extension, conferenceUsername, conferenceIdNumber, callb console.log("Quitting: Call already in progress"); return; } - // determine the resolution the user chose for webcam video - my_check_vid_res(); + + // + // if (verto) { + // verto.videoParams({ + // "minWidth": selectedVideoConstraints.constraints.minWidth, + // "minHeight": selectedVideoConstraints.constraints.minHeight, + // "maxWidth": selectedVideoConstraints.constraints.maxWidth, + // "maxHeight": selectedVideoConstraints.constraints.maxHeight, + // "minFrameRate": selectedVideoConstraints.constraints.minFrameRate, + // "vertoBestFrameRate": selectedVideoConstraints.constraints.vertoBestFrameRate + // }); + // } + // + outgoingBandwidth = "default"; incomingBandwidth = "default"; var useVideo = useCamera = useMic = false; @@ -333,29 +345,6 @@ function makeVerto(callbacks, stunsConfig, videoTag, vertoServerCredentials) { }, callbacks); } -// sets verto to begin using the resolution that the user selected -my_check_vid_res = function() { - return; - var selectedVideoConstraints = getChosenWebcamResolution(); - my_real_size(selectedVideoConstraints); - - if (verto) { - verto.videoParams({ - "minWidth": selectedVideoConstraints.constraints.minWidth, - "minHeight": selectedVideoConstraints.constraints.minHeight, - "maxWidth": selectedVideoConstraints.constraints.maxWidth, - "maxHeight": selectedVideoConstraints.constraints.maxHeight, - "minFrameRate": selectedVideoConstraints.constraints.minFrameRate, - "vertoBestFrameRate": selectedVideoConstraints.constraints.vertoBestFrameRate - }); - } -} - -my_real_size = function(selectedVideoConstraints) { - $("#" + window.videoTag).height("100%"); - $("#" + window.videoTag).width("100%"); -} - var RTCPeerConnectionCallbacks = { iceFailed: function(e) { console.log('received ice negotiation failed'); diff --git a/bigbluebutton-html5/imports/ui/components/deskshare/service.js b/bigbluebutton-html5/imports/ui/components/deskshare/service.js index 81d63575b9..73afcdd5e6 100755 --- a/bigbluebutton-html5/imports/ui/components/deskshare/service.js +++ b/bigbluebutton-html5/imports/ui/components/deskshare/service.js @@ -1,7 +1,8 @@ import Deskshare from '/imports/api/deskshare'; -import {conferenceUsername, joinVertoAudio, watchVertoVideo} from '/imports/api/verto'; +import {conferenceUsername, watchVertoVideo} from '/imports/api/verto'; import {getInStorage} from '/imports/ui/components/app/service'; import {getVoiceBridge} from '/imports/api/phone'; +import {createVertoUserName} from '/imports/api/verto'; // when the meeting information has been updated check to see if it was // desksharing. If it has changed either trigger a call to receive video @@ -49,6 +50,6 @@ function presenterDeskshareHasStarted() { }); }; -export { videoIsBroadcasting, watchDeskshare, presenterDeskshareHasEnded, - presenterDeskshareHasStarted +export { + videoIsBroadcasting, presenterDeskshareHasEnded, presenterDeskshareHasStarted }; From 844210faea03898e5b3fe156b147b4f20550168e Mon Sep 17 00:00:00 2001 From: perroned Date: Wed, 1 Jun 2016 15:56:12 +0000 Subject: [PATCH 02/27] Fixes audio permission, render tag --- .../resources/prod/lib/verto_extension.js | 9 ++++----- bigbluebutton-html5/imports/api/verto/index.js | 17 +++++++++++++++-- .../ui/components/deskshare/component.jsx | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/bigbluebutton-client/resources/prod/lib/verto_extension.js b/bigbluebutton-client/resources/prod/lib/verto_extension.js index 9114d15075..c3e3fc27ba 100755 --- a/bigbluebutton-client/resources/prod/lib/verto_extension.js +++ b/bigbluebutton-client/resources/prod/lib/verto_extension.js @@ -171,7 +171,6 @@ docall_verto = function(extension, conferenceUsername, conferenceIdNumber, callb outgoingBandwidth = "default"; incomingBandwidth = "default"; var useVideo = useCamera = useMic = false; - // debugger; if(options.watchOnly) { window.watchOnly = true; window.listenOnly = false; @@ -184,15 +183,15 @@ docall_verto = function(extension, conferenceUsername, conferenceIdNumber, callb window.watchOnly = false; window.joinAudio = false; useVideo = false; - useCamera = false; - useMic = false; + useCamera = 'none'; + useMic = 'none'; } else if(options.joinAudio) { window.joinAudio = true; window.watchOnly = false; window.listenOnly = false; useVideo = false; - useCamera = false; - useMic = true; + useCamera = 'none'; + useMic = 'any'; } cur_call = verto.newCall({ diff --git a/bigbluebutton-html5/imports/api/verto/index.js b/bigbluebutton-html5/imports/api/verto/index.js index e977df7cc1..8a8d2cb666 100755 --- a/bigbluebutton-html5/imports/api/verto/index.js +++ b/bigbluebutton-html5/imports/api/verto/index.js @@ -1,8 +1,11 @@ import {clientConfig} from '/config'; import {getVoiceBridge} from '/imports/api/phone'; +import {getInStorage} from '/imports/ui/components/app/service'; +import Users from '/imports/api/users'; function createVertoUserName() { const uid = getInStorage('userID'); + console.log(Users.find().fetch()); const uName = Users.findOne({ userId: uid }).user.name; const conferenceUsername = 'FreeSWITCH User - ' + encodeURIComponent(uName); return conferenceUsername; @@ -32,6 +35,15 @@ function joinVertoCall(options) { password: clientConfig.media.freeswitchProfilePassword, }; + const conferenceUsername = createVertoUserName(); + let el = ''; + if (options.listenOnly || options.joinAudio) { + // the element SIP is programmed to use to render SIP audio + el = 'remote-media'; + } else { + // where deskshare video will render + el = 'deskshareVideo'; + } let wasCallSuccessful = false; let debuggerCallback = function (message) { console.log('CALLBACK: ' + JSON.stringify(message)); @@ -41,12 +53,13 @@ function joinVertoCall(options) { // Always fail the first time. Retry on failure. // if (!!navigator.mozGetUserMedia && message.errorcode == 1001) { + console.error('Firefox callback error code'); const logCallback = function (m) { console.log('CALLBACK: ' + JSON.stringify(m)); }; callIntoConference_verto(extension, conferenceUsername, conferenceIdNumber, logCallback, - 'webcam', options, vertoServerCredentials); + el, options, vertoServerCredentials); } // @@ -55,7 +68,7 @@ function joinVertoCall(options) { }; callIntoConference_verto(extension, conferenceUsername, conferenceIdNumber, debuggerCallback, - 'webcam', options, vertoServerCredentials); + el, options, vertoServerCredentials); return; } } diff --git a/bigbluebutton-html5/imports/ui/components/deskshare/component.jsx b/bigbluebutton-html5/imports/ui/components/deskshare/component.jsx index 9e4a16c829..162bab54cc 100755 --- a/bigbluebutton-html5/imports/ui/components/deskshare/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/deskshare/component.jsx @@ -3,7 +3,7 @@ import React from 'react'; export default class DeskshareComponent extends React.Component { render() { return ( -