diff --git a/bigbluebutton-html5/client/compatibility/kurento-extension.js b/bigbluebutton-html5/client/compatibility/kurento-extension.js index 8c167fbb790681baabf7e0bdc3eade81cd808501..729c4954f5cc51113fa10911fd57de79f6dd80a5 100644 --- a/bigbluebutton-html5/client/compatibility/kurento-extension.js +++ b/bigbluebutton-html5/client/compatibility/kurento-extension.js @@ -5,7 +5,6 @@ const isSafari = navigator.userAgent.indexOf('Safari') >= 0 && !isChrome; const isElectron = navigator.userAgent.toLowerCase().indexOf(' electron/') > -1; const hasDisplayMedia = (typeof navigator.getDisplayMedia === 'function' || (navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia === 'function')); -const kurentoHandler = null; Kurento = function ( tag, @@ -82,7 +81,7 @@ Kurento = function ( } else { const _this = this; this.onSuccess = function () { - _this.logSuccess('Default success handler'); + _this.logger('Default success handler'); }; } }; @@ -233,7 +232,7 @@ Kurento.prototype.init = function () { this.ws = new WebSocket(this.wsUrl); this.ws.onmessage = this.onWSMessage.bind(this); - this.ws.onclose = (close) => { + this.ws.onclose = () => { kurentoManager.exitScreenShare(); self.onFail('Websocket connection closed'); }; @@ -482,9 +481,9 @@ Kurento.prototype.setAudio = function (tag) { }; Kurento.prototype.listenOnly = function () { - var self = this; + const self = this; if (!this.webRtcPeer) { - var options = { + const options = { onicecandidate : this.onListenOnlyIceCandidate.bind(this), mediaConstraints: { audio: true, @@ -496,7 +495,7 @@ Kurento.prototype.listenOnly = function () { self.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options, function (error) { if (error) { - return self.onFail(PEER_ERROR); + return self.onFail(error); } this.generateOffer(self.onOfferListenOnly.bind(self)); @@ -522,7 +521,7 @@ Kurento.prototype.onOfferListenOnly = function (error, offerSdp) { const self = this; if (error) { this.logger.error('[onOfferListenOnly]', error); - return this.onFail(SDP_ERROR); + return this.onFail(error); } const message = { @@ -657,7 +656,7 @@ window.getScreenConstraints = function (sendSource, callback) { let gDPConstraints = { video: true, optional: optionalConstraints - } + }; return gDPConstraints; }; @@ -701,7 +700,7 @@ window.getScreenConstraints = function (sendSource, callback) { kurentoManager.kurentoScreenshare.extensionInstalled = true; // Re-wrap the video constraints into the mandatory object (latest adapter) - screenConstraints.video = {} + screenConstraints.video = {}; screenConstraints.video.mandatory = {}; screenConstraints.video.mandatory.maxFrameRate = 10; screenConstraints.video.mandatory.maxHeight = kurentoManager.kurentoScreenshare.vid_max_height; diff --git a/bigbluebutton-html5/imports/api/screenshare/client/bridge/kurento.js b/bigbluebutton-html5/imports/api/screenshare/client/bridge/kurento.js index 0c5114257014b7a83c365a38e1627d49f48f2919..52ee3313b0eee5b723562e06b9b2973b813d5750 100755 --- a/bigbluebutton-html5/imports/api/screenshare/client/bridge/kurento.js +++ b/bigbluebutton-html5/imports/api/screenshare/client/bridge/kurento.js @@ -3,7 +3,6 @@ import Auth from '/imports/ui/services/auth'; import BridgeService from './service'; import { fetchWebRTCMappedStunTurnServers } from '/imports/utils/fetchStunTurnServers'; import logger from '/imports/startup/client/logger'; -import { notify } from '/imports/ui/services/notification'; const SFU_CONFIG = Meteor.settings.public.kurento; const SFU_URL = SFU_CONFIG.wsUrl; @@ -15,8 +14,6 @@ const SCREENSHARE_VIDEO_TAG = 'screenshareVideo'; const CHROME_EXTENSION_KEY = CHROME_CUSTOM_EXTENSION_KEY === 'KEY' ? CHROME_DEFAULT_EXTENSION_KEY : CHROME_CUSTOM_EXTENSION_KEY; -const ICE_CONNECTION_FAILED = 'ICE connection failed'; - const getUserId = () => Auth.userID; const getMeetingId = () => Auth.meetingID;