|
|
@@ -28,7 +28,7 @@ function JitsiConnection(appID, token, options) {
|
|
28
|
28
|
if(errType === JitsiConnectionErrors.OTHER_ERROR &&
|
|
29
|
29
|
(msg === "item-not-found" || msg === "host-unknown")) {
|
|
30
|
30
|
// FIXME: don't report the error if we are going to reload
|
|
31
|
|
- this.reload();
|
|
|
31
|
+ this._reload();
|
|
32
|
32
|
}
|
|
33
|
33
|
}.bind(this));
|
|
34
|
34
|
}
|
|
|
@@ -60,7 +60,7 @@ JitsiConnection.prototype.attach = function (options) {
|
|
60
|
60
|
* Reloads the JitsiConnection instance and all related conferences
|
|
61
|
61
|
* @param options {object} options to be overriden
|
|
62
|
62
|
*/
|
|
63
|
|
-JitsiConnection.prototype.reload = function (options) {
|
|
|
63
|
+JitsiConnection.prototype._reload = function (options) {
|
|
64
|
64
|
if(this.retryOnFail === 0)
|
|
65
|
65
|
return false;
|
|
66
|
66
|
this.retryOnFail--;
|
|
|
@@ -70,7 +70,7 @@ JitsiConnection.prototype.reload = function (options) {
|
|
70
|
70
|
this.conferences[name].leave(true);
|
|
71
|
71
|
}
|
|
72
|
72
|
this.connectionEstablishedHandler =
|
|
73
|
|
- this.reloadConferences.bind(this, states);
|
|
|
73
|
+ this._reloadConferences.bind(this, states);
|
|
74
|
74
|
this.addEventListener(JitsiConnectionEvents.CONNECTION_ESTABLISHED,
|
|
75
|
75
|
this.connectionEstablishedHandler);
|
|
76
|
76
|
this.xmpp.reload(options || {});
|
|
|
@@ -81,13 +81,13 @@ JitsiConnection.prototype.reload = function (options) {
|
|
81
|
81
|
* Reloads all conferences related to this JitsiConnection instance
|
|
82
|
82
|
* @param states {object} the exported states per conference
|
|
83
|
83
|
*/
|
|
84
|
|
-JitsiConnection.prototype.reloadConferences = function (states) {
|
|
|
84
|
+JitsiConnection.prototype._reloadConferences = function (states) {
|
|
85
|
85
|
this.removeEventListener(JitsiConnectionEvents.CONNECTION_ESTABLISHED,
|
|
86
|
86
|
this.connectionEstablishedHandler);
|
|
87
|
87
|
this.connectionEstablishedHandler = null;
|
|
88
|
88
|
states = states || {};
|
|
89
|
89
|
for(var name in this.conferences) {
|
|
90
|
|
- this.conferences[name].reinitialize({connection: this,
|
|
|
90
|
+ this.conferences[name]._reinitialize({connection: this,
|
|
91
|
91
|
roomState: states[name]});
|
|
92
|
92
|
}
|
|
93
|
93
|
}
|