Fixes DS icon glow

This commit is contained in:
hristoterezov 2016-01-22 15:10:59 -06:00
parent 724ebdfe04
commit dbd24417c4
2 changed files with 18 additions and 13 deletions

View File

@ -663,7 +663,8 @@ export default {
APP.desktopsharing.toggleScreenSharing();
});
APP.UI.addListener(DSEvents.SWITCHING_DONE, (isSharingScreen) => {
APP.desktopsharing.addListener(DSEvents.SWITCHING_DONE,
(isSharingScreen) => {
APP.UI.updateDesktopSharingButtons(isSharingScreen);
});
@ -675,22 +676,25 @@ export default {
APP.desktopsharing.addListener(DSEvents.NEW_STREAM_CREATED,
(track, callback) => {
const localCallback = (newTrack) => {
if(!newTrack)
if(!newTrack || !newTrack.isLocal() ||
newTrack !== localVideo)
return;
if (newTrack.isLocal() && newTrack === localVideo) {
if(localVideo.isMuted() &&
localVideo.videoType !== track.videoType) {
localVideo.mute();
}
callback();
room.off(ConferenceEvents.TRACK_ADDED, localCallback);
if(localVideo.isMuted() &&
localVideo.videoType !== track.videoType) {
localVideo.mute();
}
callback();
if(room)
room.off(ConferenceEvents.TRACK_ADDED, localCallback);
};
room.on(ConferenceEvents.TRACK_ADDED, localCallback);
if(room) {
room.on(ConferenceEvents.TRACK_ADDED, localCallback);
}
localVideo.stop();
localVideo = track;
addTrack(track);
if(!room)
localCallback();
APP.UI.addLocalStream(track);
}
);

View File

@ -1376,7 +1376,8 @@ var LibJitsiMeet = {
this._gumFailedHandler.forEach(function (handler) {
handler(error);
});
Statistics.sendGetUserMediaFailed(error);
if(!this._gumFailedHandler.length)
Statistics.sendGetUserMediaFailed(error);
if(error === JitsiTrackErrors.UNSUPPORTED_RESOLUTION) {
var oldResolution = options.resolution || '360';
var newResolution = getLowerResolution(oldResolution);
@ -6589,7 +6590,7 @@ Statistics.prototype.getPeerSSRCAudioLevel = function (peerJid, ssrc) {
* /modules/settings/Settings.js
*/
Statistics.prototype.startCallStats = function (session, settings) {
if(this.callStatsIntegrationEnabled) {
if(this.callStatsIntegrationEnabled && !this.callstats) {
this.callstats = new CallStats(session, settings, this.options);
}
}