From e79d476d89169177bd7acf4ee721be922818a4d3 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Wed, 19 Aug 2015 18:27:09 +0200 Subject: [PATCH] Updates app.bundle.js --- index.html | 2 +- libs/app.bundle.js | 57 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 46 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 25d877ca5..fade156cc 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@ - + diff --git a/libs/app.bundle.js b/libs/app.bundle.js index 8f38c73dd..159cc1326 100644 --- a/libs/app.bundle.js +++ b/libs/app.bundle.js @@ -2067,7 +2067,7 @@ RTCUtils.prototype.createStream = function(stream, isVideo) { module.exports = RTCUtils; },{"../../service/RTC/Resolutions":166,"../xmpp/SDPUtil":60,"./RTCBrowserType":10,"./adapter.screenshare":12}],12:[function(require,module,exports){ -/*! adapterjs - custom version from - 2015-08-18 */ +/*! adapterjs - custom version from - 2015-08-19 */ // Adapter's interface. var AdapterJS = AdapterJS || {}; @@ -2423,13 +2423,12 @@ AdapterJS.renderNotificationBar = function (text, buttonText, buttonLink, openNe AdapterJS.WebRTCPlugin.isPluginInstalled( AdapterJS.WebRTCPlugin.pluginInfo.prefix, AdapterJS.WebRTCPlugin.pluginInfo.plugName, - AdapterJS.WebRTCPlugin.defineWebRTCInterface, - function() { + function() { // plugin now installed clearInterval(pluginInstallInterval); AdapterJS.WebRTCPlugin.defineWebRTCInterface(); }, - function() { - //Does nothing because not used here + function() { + // still no plugin detected, nothing to do }); } , 500); }); @@ -2802,6 +2801,28 @@ if (navigator.mozGetUserMedia) { return to; }; + AdapterJS.maybeThroughWebRTCReady(); +} else if (navigator.mediaDevices && navigator.userAgent.match( + /Edge\/(\d+).(\d+)$/)) { + webrtcDetectedBrowser = 'edge'; + + webrtcDetectedVersion = + parseInt(navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)[2], 10); + + // the minimum version still supported by adapter. + webrtcMinimumVersion = 12; + + getUserMedia = navigator.getUserMedia; + + attachMediaStream = function(element, stream) { + element.srcObject = stream; + return element; + }; + reattachMediaStream = function(to, from) { + to.srcObject = from.srcObject; + return to; + }; + AdapterJS.maybeThroughWebRTCReady(); } else { // TRY TO USE PLUGIN // IE 9 is not offering an implementation of console.log until you open a console @@ -2954,9 +2975,10 @@ if (navigator.mozGetUserMedia) { AdapterJS.WebRTCPlugin.defineWebRTCInterface = function () { if (AdapterJS.WebRTCPlugin.pluginState === AdapterJS.WebRTCPlugin.PLUGIN_STATES.READY) { - console.error("WebRTC interface has been defined already"); + console.error("AdapterJS - WebRTC interface has already been defined"); return; } + AdapterJS.WebRTCPlugin.pluginState = AdapterJS.WebRTCPlugin.PLUGIN_STATES.INITIALIZING; AdapterJS.isDefined = function (variable) { @@ -3053,9 +3075,10 @@ if (navigator.mozGetUserMedia) { } var elementId = element.id.length === 0 ? Math.random().toString(36).slice(2) : element.id; - if (!element.isWebRTCPlugin || !element.isWebRTCPlugin()) { + var nodeName = element.nodeName.toLowerCase(); + if (nodeName !== 'object') { // not a plugin tag yet var tag; - switch(element.nodeName.toLowerCase()) { + switch(nodeName) { case 'audio': tag = AdapterJS.WebRTCPlugin.TAGS.AUDIO; break; @@ -3106,7 +3129,7 @@ if (navigator.mozGetUserMedia) { frag.width = width; frag.height = height; element.parentNode.removeChild(element); - } else { + } else { // already an tag, just change the stream id var children = element.children; for (var i = 0; i !== children.length; ++i) { if (children[i].name === 'streamId') { @@ -3118,9 +3141,9 @@ if (navigator.mozGetUserMedia) { } var newElement = document.getElementById(elementId); newElement.onplaying = (element.onplaying) ? element.onplaying : function (arg) {}; + newElement.onclick = (element.onclick) ? element.onclick : function (arg) {}; if (isIE) { // on IE the event needs to be plugged manually newElement.attachEvent('onplaying', newElement.onplaying); - newElement.onclick = (element.onclick) ? element.onclick : function (arg) {}; newElement._TemOnClick = function (id) { var arg = { srcElement : document.getElementById(id) @@ -8694,7 +8717,7 @@ function changeVideo(isVisible) { if (isVisible) { LargeVideo.VideoLayout.largeVideoUpdated(currentSmallVideo); - $('#largeVideoWrapper').fadeIn(300); + $('#largeVideoWrapper').fadeTo(300, 1); } } @@ -8829,7 +8852,7 @@ var LargeVideo = { // If for any reason large video was hidden before calling fadeOut // changeVideo will never be called, so we call show() in chain just // to be sure - $('#largeVideoWrapper').show().fadeOut(300, + $('#largeVideoWrapper').show().fadeTo(300, 0, changeVideo.bind($('#largeVideo'), this.isLargeVideoVisible())); } else { if (currentSmallVideo) { @@ -10213,6 +10236,16 @@ var VideoLayout = (function (my) { localAudio.autoplay = true; localAudio.volume = 0; } + // Now when Temasys plugin is converting also