Repairing callstats, fix scoping on this for screen obtainer callback,
stopping new stream in RTC
This commit is contained in:
parent
168de5ecad
commit
831943e0bf
|
@ -159,10 +159,14 @@ var RTC = {
|
|||
this.rtcUtils = null;
|
||||
}
|
||||
// Remove all local streams on cleanup
|
||||
while (this.localStreams.length > 0) {
|
||||
var stream = this.localStreams[0];
|
||||
this.stopMediaStream(stream.getOriginalStream());
|
||||
while (this.localAudio.length > 0) {
|
||||
this.stopMediaStream(this.localAudio[0]
|
||||
.getOriginalStream());
|
||||
}
|
||||
while (this.localVideo.length > 0) {
|
||||
this.stopMediaStream(this.localVideo[0]
|
||||
.getOriginalStream());
|
||||
}
|
||||
if (eventEmitter) {
|
||||
eventEmitter.removeAllListeners();
|
||||
}
|
||||
|
|
|
@ -270,6 +270,7 @@ function obtainScreenFromExtension(streamCallback, failCallback) {
|
|||
'Changes will take effect after next Chrome restart.');
|
||||
}
|
||||
|
||||
var _this = this;
|
||||
chrome.webstore.install(
|
||||
getWebStoreInstallUrl(),
|
||||
function (arg) {
|
||||
|
@ -281,7 +282,7 @@ function obtainScreenFromExtension(streamCallback, failCallback) {
|
|||
}, 500);
|
||||
},
|
||||
function (arg) {
|
||||
this.eventEmitter
|
||||
_this.eventEmitter
|
||||
.emit(DesktopSharingEventTypes.EXTENSION_INSTALLATION_ERROR);
|
||||
console.log("Failed to install the extension", arg);
|
||||
failCallback(arg);
|
||||
|
|
|
@ -31,6 +31,8 @@ var callStatsIntegrationEnabled = config.callStatsID && config.callStatsSecret;
|
|||
|
||||
var CallStats = {
|
||||
init: function (jingleSession) {
|
||||
callStatsIntegrationEnabled = config.callStatsID
|
||||
&& config.callStatsSecret;
|
||||
if(!callStatsIntegrationEnabled || callStats !== null) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue