|
@@ -227,6 +227,49 @@ RemoteVideo.prototype.removeRemoteStreamElement = function (stream) {
|
227
|
227
|
this.VideoLayout.updateLargeVideo(this.id);
|
228
|
228
|
};
|
229
|
229
|
|
|
230
|
+/**
|
|
231
|
+ * Checks whether the remote user associated with this <tt>RemoteVideo</tt>
|
|
232
|
+ * has connectivity issues.
|
|
233
|
+ *
|
|
234
|
+ * @return {boolean} <tt>true</tt> if the user's connection is fine or
|
|
235
|
+ * <tt>false</tt> otherwise.
|
|
236
|
+ */
|
|
237
|
+RemoteVideo.prototype.isConnectionActive = function() {
|
|
238
|
+ return this.user.isConnectionActive();
|
|
239
|
+};
|
|
240
|
+
|
|
241
|
+/**
|
|
242
|
+ * @inheritDoc
|
|
243
|
+ */
|
|
244
|
+RemoteVideo.prototype.updateView = function () {
|
|
245
|
+ SmallVideo.prototype.updateView.call(this);
|
|
246
|
+ this.updateConnectionStatusIndicator(
|
|
247
|
+ null /* will obtain the status from 'conference' */);
|
|
248
|
+};
|
|
249
|
+
|
|
250
|
+/**
|
|
251
|
+ * Updates the UI to reflect user's connectivity status.
|
|
252
|
+ * @param isActive {boolean|null} 'true' if user's connection is active or
|
|
253
|
+ * 'false' when the use is having some connectivity issues and a warning
|
|
254
|
+ * should be displayed. When 'null' is passed then the current value will be
|
|
255
|
+ * obtained from the conference instance.
|
|
256
|
+ */
|
|
257
|
+RemoteVideo.prototype.updateConnectionStatusIndicator = function (isActive) {
|
|
258
|
+ // Check for initial value if 'isActive' is not defined
|
|
259
|
+ if (typeof isActive !== "boolean") {
|
|
260
|
+ isActive = this.isConnectionActive();
|
|
261
|
+ if (isActive === null) {
|
|
262
|
+ // Cancel processing at this point - no update
|
|
263
|
+ return;
|
|
264
|
+ }
|
|
265
|
+ }
|
|
266
|
+
|
|
267
|
+ console.debug(this.id + " thumbnail is connection active ? " + isActive);
|
|
268
|
+
|
|
269
|
+ if(this.connectionIndicator)
|
|
270
|
+ this.connectionIndicator.updateConnectionStatusIndicator(isActive);
|
|
271
|
+};
|
|
272
|
+
|
230
|
273
|
/**
|
231
|
274
|
* Removes RemoteVideo from the page.
|
232
|
275
|
*/
|