Merge remote-tracking branch 'origin/master' into issue/toolbar-refactor

This commit is contained in:
Issac Gerges 2015-08-12 13:05:20 -05:00
commit da75e17ff5
7 changed files with 100 additions and 16 deletions

View File

@ -22,7 +22,7 @@
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib --> <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
<script src="libs/toastr.js?v=1"></script><!-- notifications lib --> <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
<script src="interface_config.js?v=5"></script> <script src="interface_config.js?v=5"></script>
<script src="libs/app.bundle.js?v=121"></script> <script src="libs/app.bundle.js?v=122"></script>
<script src="analytics.js?v=1"></script><!-- google analytics plugin --> <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
<link rel="stylesheet" href="css/font.css?v=7"/> <link rel="stylesheet" href="css/font.css?v=7"/>
<link rel="stylesheet" href="css/toastr.css?v=1"> <link rel="stylesheet" href="css/toastr.css?v=1">

View File

@ -2082,7 +2082,7 @@ RTCUtils.prototype.createStream = function(stream, isVideo) {
module.exports = RTCUtils; module.exports = RTCUtils;
},{"../../service/RTC/Resolutions":112,"../xmpp/SDPUtil":60,"./RTCBrowserType":10,"./adapter.screenshare":12}],12:[function(require,module,exports){ },{"../../service/RTC/Resolutions":112,"../xmpp/SDPUtil":60,"./RTCBrowserType":10,"./adapter.screenshare":12}],12:[function(require,module,exports){
/*! adapterjs - v0.11.0 - 2015-06-08 */ /*! adapterjs - custom version from - 2015-08-12 */
// Adapter's interface. // Adapter's interface.
var AdapterJS = AdapterJS || {}; var AdapterJS = AdapterJS || {};
@ -2101,7 +2101,7 @@ AdapterJS.options = AdapterJS.options || {};
// AdapterJS.options.hidePluginInstallPrompt = true; // AdapterJS.options.hidePluginInstallPrompt = true;
// AdapterJS version // AdapterJS version
AdapterJS.VERSION = '0.11.0'; AdapterJS.VERSION = '0.11.1';
// This function will be called when the WebRTC API is ready to be used // This function will be called when the WebRTC API is ready to be used
// Whether it is the native implementation (Chrome, Firefox, Opera) or // Whether it is the native implementation (Chrome, Firefox, Opera) or
@ -2424,9 +2424,24 @@ AdapterJS.renderNotificationBar = function (text, buttonText, buttonLink, openNe
try { try {
event.cancelBubble = true; event.cancelBubble = true;
} catch(error) { } } catch(error) { }
});
var pluginInstallInterval = setInterval(function(){
if(! isIE) {
navigator.plugins.refresh(false);
} }
else { AdapterJS.WebRTCPlugin.isPluginInstalled(
AdapterJS.WebRTCPlugin.pluginInfo.prefix,
AdapterJS.WebRTCPlugin.pluginInfo.plugName,
function() {
clearInterval(pluginInstallInterval);
AdapterJS.WebRTCPlugin.defineWebRTCInterface()
},
function() { //Does nothing because not used here
});
} , 500);
});
}else {
c.document.close(); c.document.close();
} }
AdapterJS.addEvent(c.document, 'click', function() { AdapterJS.addEvent(c.document, 'click', function() {
@ -2944,6 +2959,11 @@ if (navigator.mozGetUserMedia) {
}; };
AdapterJS.WebRTCPlugin.defineWebRTCInterface = function () { AdapterJS.WebRTCPlugin.defineWebRTCInterface = function () {
if (AdapterJS.WebRTCPlugin.pluginState ===
AdapterJS.WebRTCPlugin.PLUGIN_STATES.READY) {
console.error("WebRTC interface has been defined already");
return;
}
AdapterJS.WebRTCPlugin.pluginState = AdapterJS.WebRTCPlugin.PLUGIN_STATES.INITIALIZING; AdapterJS.WebRTCPlugin.pluginState = AdapterJS.WebRTCPlugin.PLUGIN_STATES.INITIALIZING;
AdapterJS.isDefined = function (variable) { AdapterJS.isDefined = function (variable) {
@ -8206,6 +8226,20 @@ module.exports = {
element.setAttribute("data-placement", position); element.setAttribute("data-placement", position);
element.setAttribute("data-html", true); element.setAttribute("data-html", true);
element.setAttribute("data-container", "body"); element.setAttribute("data-container", "body");
},
/**
* Inserts given child element as the first one into the container.
* @param container the container to which new child element will be added
* @param newChild the new element that will be inserted into the container
*/
prependChild: function (container, newChild) {
var firstChild = container.childNodes[0];
if (firstChild) {
container.insertBefore(newChild, firstChild);
} else {
container.appendChild(newChild);
}
} }
}; };
},{"../side_pannels/SidePanelToggler":22}],36:[function(require,module,exports){ },{"../side_pannels/SidePanelToggler":22}],36:[function(require,module,exports){
@ -9468,7 +9502,8 @@ LocalVideo.prototype.changeVideo = function (stream, isMuted) {
localVideo.oncontextmenu = function () { return false; }; localVideo.oncontextmenu = function () { return false; };
var localVideoContainer = document.getElementById('localVideoWrapper'); var localVideoContainer = document.getElementById('localVideoWrapper');
localVideoContainer.appendChild(localVideo); // Put the new video always in front
UIUtil.prependChild(localVideoContainer, localVideo);
var localVideoSelector = $('#' + localVideo.id); var localVideoSelector = $('#' + localVideo.id);
@ -9516,6 +9551,7 @@ var AudioLevels = require("../audio_levels/AudioLevels");
var LargeVideo = require("./LargeVideo"); var LargeVideo = require("./LargeVideo");
var Avatar = require("../avatar/Avatar"); var Avatar = require("../avatar/Avatar");
var RTCBrowserType = require("../../RTC/RTCBrowserType"); var RTCBrowserType = require("../../RTC/RTCBrowserType");
var UIUtils = require("../util/UIUtil");
function RemoteVideo(peerJid, VideoLayout) { function RemoteVideo(peerJid, VideoLayout) {
this.peerJid = peerJid; this.peerJid = peerJid;
@ -9723,7 +9759,8 @@ RemoteVideo.prototype.addRemoteStreamElement = function (sid, stream, thessrc) {
var streamElement = SmallVideo.createStreamElement(sid, stream); var streamElement = SmallVideo.createStreamElement(sid, stream);
var newElementId = streamElement.id; var newElementId = streamElement.id;
this.container.appendChild(streamElement); // Put new stream element always in front
UIUtils.prependChild(this.container, streamElement);
var sel = $('#' + newElementId); var sel = $('#' + newElementId);
sel.hide(); sel.hide();
@ -9924,7 +9961,7 @@ RemoteVideo.createContainer = function (spanId) {
module.exports = RemoteVideo; module.exports = RemoteVideo;
},{"../../RTC/RTCBrowserType":10,"../audio_levels/AudioLevels":14,"../avatar/Avatar":18,"./ConnectionIndicator":36,"./LargeVideo":37,"./SmallVideo":40}],40:[function(require,module,exports){ },{"../../RTC/RTCBrowserType":10,"../audio_levels/AudioLevels":14,"../avatar/Avatar":18,"../util/UIUtil":35,"./ConnectionIndicator":36,"./LargeVideo":37,"./SmallVideo":40}],40:[function(require,module,exports){
/* global $, APP, require */ /* global $, APP, require */
var Avatar = require("../avatar/Avatar"); var Avatar = require("../avatar/Avatar");
var UIUtil = require("../util/UIUtil"); var UIUtil = require("../util/UIUtil");
@ -15395,6 +15432,11 @@ var LocalSSRCReplacement = {
if (!isEnabled) if (!isEnabled)
return localDescription; return localDescription;
if (!localDescription) {
console.warn("localDescription is null or undefined");
return localDescription;
}
// IF we have local video SSRC stored make sure it is replaced // IF we have local video SSRC stored make sure it is replaced
// with old SSRC // with old SSRC
if (localVideoSSRC) { if (localVideoSSRC) {

View File

@ -1,4 +1,4 @@
/*! adapterjs - v0.11.0 - 2015-06-08 */ /*! adapterjs - custom version from - 2015-08-12 */
// Adapter's interface. // Adapter's interface.
var AdapterJS = AdapterJS || {}; var AdapterJS = AdapterJS || {};
@ -17,7 +17,7 @@ AdapterJS.options = AdapterJS.options || {};
// AdapterJS.options.hidePluginInstallPrompt = true; // AdapterJS.options.hidePluginInstallPrompt = true;
// AdapterJS version // AdapterJS version
AdapterJS.VERSION = '0.11.0'; AdapterJS.VERSION = '0.11.1';
// This function will be called when the WebRTC API is ready to be used // This function will be called when the WebRTC API is ready to be used
// Whether it is the native implementation (Chrome, Firefox, Opera) or // Whether it is the native implementation (Chrome, Firefox, Opera) or
@ -340,9 +340,24 @@ AdapterJS.renderNotificationBar = function (text, buttonText, buttonLink, openNe
try { try {
event.cancelBubble = true; event.cancelBubble = true;
} catch(error) { } } catch(error) { }
});
var pluginInstallInterval = setInterval(function(){
if(! isIE) {
navigator.plugins.refresh(false);
} }
else { AdapterJS.WebRTCPlugin.isPluginInstalled(
AdapterJS.WebRTCPlugin.pluginInfo.prefix,
AdapterJS.WebRTCPlugin.pluginInfo.plugName,
function() {
clearInterval(pluginInstallInterval);
AdapterJS.WebRTCPlugin.defineWebRTCInterface()
},
function() { //Does nothing because not used here
});
} , 500);
});
}else {
c.document.close(); c.document.close();
} }
AdapterJS.addEvent(c.document, 'click', function() { AdapterJS.addEvent(c.document, 'click', function() {
@ -860,6 +875,11 @@ if (navigator.mozGetUserMedia) {
}; };
AdapterJS.WebRTCPlugin.defineWebRTCInterface = function () { AdapterJS.WebRTCPlugin.defineWebRTCInterface = function () {
if (AdapterJS.WebRTCPlugin.pluginState ===
AdapterJS.WebRTCPlugin.PLUGIN_STATES.READY) {
console.error("WebRTC interface has been defined already");
return;
}
AdapterJS.WebRTCPlugin.pluginState = AdapterJS.WebRTCPlugin.PLUGIN_STATES.INITIALIZING; AdapterJS.WebRTCPlugin.pluginState = AdapterJS.WebRTCPlugin.PLUGIN_STATES.INITIALIZING;
AdapterJS.isDefined = function (variable) { AdapterJS.isDefined = function (variable) {

View File

@ -78,5 +78,19 @@ module.exports = {
element.setAttribute("data-placement", position); element.setAttribute("data-placement", position);
element.setAttribute("data-html", true); element.setAttribute("data-html", true);
element.setAttribute("data-container", "body"); element.setAttribute("data-container", "body");
},
/**
* Inserts given child element as the first one into the container.
* @param container the container to which new child element will be added
* @param newChild the new element that will be inserted into the container
*/
prependChild: function (container, newChild) {
var firstChild = container.childNodes[0];
if (firstChild) {
container.insertBefore(newChild, firstChild);
} else {
container.appendChild(newChild);
}
} }
}; };

View File

@ -201,7 +201,8 @@ LocalVideo.prototype.changeVideo = function (stream, isMuted) {
localVideo.oncontextmenu = function () { return false; }; localVideo.oncontextmenu = function () { return false; };
var localVideoContainer = document.getElementById('localVideoWrapper'); var localVideoContainer = document.getElementById('localVideoWrapper');
localVideoContainer.appendChild(localVideo); // Put the new video always in front
UIUtil.prependChild(localVideoContainer, localVideo);
var localVideoSelector = $('#' + localVideo.id); var localVideoSelector = $('#' + localVideo.id);

View File

@ -5,6 +5,7 @@ var AudioLevels = require("../audio_levels/AudioLevels");
var LargeVideo = require("./LargeVideo"); var LargeVideo = require("./LargeVideo");
var Avatar = require("../avatar/Avatar"); var Avatar = require("../avatar/Avatar");
var RTCBrowserType = require("../../RTC/RTCBrowserType"); var RTCBrowserType = require("../../RTC/RTCBrowserType");
var UIUtils = require("../util/UIUtil");
function RemoteVideo(peerJid, VideoLayout) { function RemoteVideo(peerJid, VideoLayout) {
this.peerJid = peerJid; this.peerJid = peerJid;
@ -212,7 +213,8 @@ RemoteVideo.prototype.addRemoteStreamElement = function (sid, stream, thessrc) {
var streamElement = SmallVideo.createStreamElement(sid, stream); var streamElement = SmallVideo.createStreamElement(sid, stream);
var newElementId = streamElement.id; var newElementId = streamElement.id;
this.container.appendChild(streamElement); // Put new stream element always in front
UIUtils.prependChild(this.container, streamElement);
var sel = $('#' + newElementId); var sel = $('#' + newElementId);
sel.hide(); sel.hide();

View File

@ -168,6 +168,11 @@ var LocalSSRCReplacement = {
if (!isEnabled) if (!isEnabled)
return localDescription; return localDescription;
if (!localDescription) {
console.warn("localDescription is null or undefined");
return localDescription;
}
// IF we have local video SSRC stored make sure it is replaced // IF we have local video SSRC stored make sure it is replaced
// with old SSRC // with old SSRC
if (localVideoSSRC) { if (localVideoSSRC) {