|
@@ -81,6 +81,27 @@ export default class LargeVideoManager {
|
81
|
81
|
container.onHoverOut(e);
|
82
|
82
|
}
|
83
|
83
|
|
|
84
|
+ /**
|
|
85
|
+ * Called when the media connection has been interrupted.
|
|
86
|
+ */
|
|
87
|
+ onVideoInterrupted () {
|
|
88
|
+ this.enableVideoProblemFilter(true);
|
|
89
|
+ let reconnectingKey = "connection.RECONNECTING";
|
|
90
|
+ $('#videoConnectionMessage')
|
|
91
|
+ .attr("data-i18n", reconnectingKey)
|
|
92
|
+ .text(APP.translation.translateString(reconnectingKey));
|
|
93
|
+ // Show the message only if the video is currently being displayed
|
|
94
|
+ this.showVideoConnectionMessage(this.state === VIDEO_CONTAINER_TYPE);
|
|
95
|
+ }
|
|
96
|
+
|
|
97
|
+ /**
|
|
98
|
+ * Called when the media connection has been restored.
|
|
99
|
+ */
|
|
100
|
+ onVideoRestored () {
|
|
101
|
+ this.enableVideoProblemFilter(false);
|
|
102
|
+ this.showVideoConnectionMessage(false);
|
|
103
|
+ }
|
|
104
|
+
|
84
|
105
|
get id () {
|
85
|
106
|
let container = this.getContainer(this.state);
|
86
|
107
|
return container.id;
|
|
@@ -213,8 +234,7 @@ export default class LargeVideoManager {
|
213
|
234
|
* @param enable <tt>true</tt> to enable, <tt>false</tt> to disable
|
214
|
235
|
*/
|
215
|
236
|
enableVideoProblemFilter (enable) {
|
216
|
|
- let container = this.getContainer(this.state);
|
217
|
|
- container.$video.toggleClass("videoProblemFilter", enable);
|
|
237
|
+ this.videoContainer.enableVideoProblemFilter(enable);
|
218
|
238
|
}
|
219
|
239
|
|
220
|
240
|
/**
|
|
@@ -232,6 +252,24 @@ export default class LargeVideoManager {
|
232
|
252
|
$('.watermark').css('visibility', show ? 'visible' : 'hidden');
|
233
|
253
|
}
|
234
|
254
|
|
|
255
|
+ /**
|
|
256
|
+ * Shows/hides the "video connection message".
|
|
257
|
+ * @param {boolean|null} show(optional) tells whether the message is to be
|
|
258
|
+ * displayed or not. If missing the condition will be based on the value
|
|
259
|
+ * obtained from {@link APP.conference.isConnectionInterrupted}.
|
|
260
|
+ */
|
|
261
|
+ showVideoConnectionMessage (show) {
|
|
262
|
+ if (typeof show !== 'boolean') {
|
|
263
|
+ show = APP.conference.isConnectionInterrupted();
|
|
264
|
+ }
|
|
265
|
+
|
|
266
|
+ if (show) {
|
|
267
|
+ $('#videoConnectionMessage').css({display: "block"});
|
|
268
|
+ } else {
|
|
269
|
+ $('#videoConnectionMessage').css({display: "none"});
|
|
270
|
+ }
|
|
271
|
+ }
|
|
272
|
+
|
235
|
273
|
/**
|
236
|
274
|
* Add container of specified type.
|
237
|
275
|
* @param {string} type container type
|
|
@@ -285,8 +323,12 @@ export default class LargeVideoManager {
|
285
|
323
|
}
|
286
|
324
|
|
287
|
325
|
let oldContainer = this.containers[this.state];
|
|
326
|
+ // FIXME when video is being replaced with other content we need to hide
|
|
327
|
+ // companion icons/messages. It would be best if the container would
|
|
328
|
+ // be taking care of it by itself, but that is a bigger refactoring
|
288
|
329
|
if (this.state === VIDEO_CONTAINER_TYPE) {
|
289
|
330
|
this.showWatermark(false);
|
|
331
|
+ this.showVideoConnectionMessage(false);
|
290
|
332
|
}
|
291
|
333
|
oldContainer.hide();
|
292
|
334
|
|
|
@@ -295,7 +337,12 @@ export default class LargeVideoManager {
|
295
|
337
|
|
296
|
338
|
return container.show().then(() => {
|
297
|
339
|
if (type === VIDEO_CONTAINER_TYPE) {
|
|
340
|
+ // FIXME when video appears on top of other content we need to
|
|
341
|
+ // show companion icons/messages. It would be best if
|
|
342
|
+ // the container would be taking care of it by itself, but that
|
|
343
|
+ // is a bigger refactoring
|
298
|
344
|
this.showWatermark(true);
|
|
345
|
+ this.showVideoConnectionMessage(/* fetch the current state */);
|
299
|
346
|
}
|
300
|
347
|
});
|
301
|
348
|
}
|