Kaynağa Gözat

ref(LargeVideoManager): introduce 'setVideoConnectionMessage'

j8
paweldomas 9 yıl önce
ebeveyn
işleme
5952261e87
1 değiştirilmiş dosya ile 16 ekleme ve 4 silme
  1. 16
    4
      modules/UI/videolayout/LargeVideoManager.js

+ 16
- 4
modules/UI/videolayout/LargeVideoManager.js Dosyayı Görüntüle

@@ -92,10 +92,7 @@ export default class LargeVideoManager {
92 92
      */
93 93
     onVideoInterrupted () {
94 94
         this.enableLocalConnectionProblemFilter(true);
95
-        let reconnectingKey = "connection.RECONNECTING";
96
-        $('#videoConnectionMessage')
97
-            .attr("data-i18n", reconnectingKey)
98
-            .text(APP.translation.translateString(reconnectingKey));
95
+        this._setVideoConnectionMessage("connection.RECONNECTING")
99 96
         // Show the message only if the video is currently being displayed
100 97
         this.showVideoConnectionMessage(this.state === VIDEO_CONTAINER_TYPE);
101 98
     }
@@ -282,6 +279,21 @@ export default class LargeVideoManager {
282 279
         }
283 280
     }
284 281
 
282
+    /**
283
+     * Updated the text which is to be shown on the top of large video.
284
+     *
285
+     * @param {string} msgKey the translation key which will be used to get
286
+     * the message text to be displayed on the large video.
287
+     * @param {object} msgOptions translation options object
288
+     *
289
+     * @private
290
+     */
291
+    _setVideoConnectionMessage (msgKey, msgOptions) {
292
+        $('#videoConnectionMessage')
293
+            .attr("data-i18n", msgKey)
294
+            .text(APP.translation.translateString(msgKey, msgOptions));
295
+    }
296
+
285 297
     /**
286 298
      * Add container of specified type.
287 299
      * @param {string} type container type

Loading…
İptal
Kaydet