|
@@ -74,6 +74,7 @@ function initCallback (err, msg) {
|
74
|
74
|
|
75
|
75
|
CallStats.initializeFailed = false;
|
76
|
76
|
CallStats.initialized = true;
|
|
77
|
+ CallStats.feedbackEnabled = true;
|
77
|
78
|
|
78
|
79
|
// notify callstats about failures if there were any
|
79
|
80
|
if (CallStats.reportsQueue.length) {
|
|
@@ -137,12 +138,8 @@ function _try_catch (f) {
|
137
|
138
|
*/
|
138
|
139
|
var CallStats = _try_catch(function(jingleSession, Settings, options) {
|
139
|
140
|
try{
|
140
|
|
- //check weather that should work with more than 1 peerconnection
|
141
|
|
- if(!callStats) {
|
142
|
|
- callStats = new callstats($, io, jsSHA);
|
143
|
|
- } else {
|
144
|
|
- return;
|
145
|
|
- }
|
|
141
|
+ CallStats.feedbackEnabled = false;
|
|
142
|
+ callStats = new callstats($, io, jsSHA);
|
146
|
143
|
|
147
|
144
|
this.session = jingleSession;
|
148
|
145
|
this.peerconnection = jingleSession.peerconnection.peerconnection;
|
|
@@ -197,6 +194,12 @@ CallStats.initializeInProgress = false;
|
197
|
194
|
*/
|
198
|
195
|
CallStats.initializeFailed = false;
|
199
|
196
|
|
|
197
|
+/**
|
|
198
|
+ * Shows weather sending feedback is enabled or not
|
|
199
|
+ * @type {boolean}
|
|
200
|
+ */
|
|
201
|
+CallStats.feedbackEnabled = false;
|
|
202
|
+
|
200
|
203
|
/**
|
201
|
204
|
* Checks whether we need to re-initialize callstats and starts the process.
|
202
|
205
|
* @private
|
|
@@ -406,7 +409,7 @@ CallStats.prototype.sendIceConnectionFailedEvent = _try_catch(function (pc, cs){
|
406
|
409
|
*/
|
407
|
410
|
CallStats.prototype.sendFeedback = _try_catch(
|
408
|
411
|
function(overallFeedback, detailedFeedback) {
|
409
|
|
- if(!CallStats.initialized) {
|
|
412
|
+ if(!CallStats.feedbackEnabled) {
|
410
|
413
|
return;
|
411
|
414
|
}
|
412
|
415
|
var feedbackString = '{"userID":"' + this.userID + '"' +
|
|
@@ -523,7 +526,9 @@ CallStats.sendApplicationLog = _try_catch(function (e, cs) {
|
523
|
526
|
* Clears allocated resources.
|
524
|
527
|
*/
|
525
|
528
|
CallStats.dispose = function () {
|
526
|
|
- callStats = null;
|
|
529
|
+ // The next line is commented because we need to be able to send feedback
|
|
530
|
+ // even after the conference has been destroyed.
|
|
531
|
+ // callStats = null;
|
527
|
532
|
CallStats.initialized = false;
|
528
|
533
|
CallStats.initializeFailed = false;
|
529
|
534
|
CallStats.initializeInProgress = false;
|