Browse Source

Move Temasys-specific attach to its existing execution branch

dev1
hristoterezov 9 years ago
parent
commit
7499423fed
2 changed files with 8 additions and 9 deletions
  1. 1
    9
      modules/RTC/JitsiTrack.js
  2. 7
    0
      modules/RTC/RTCUtils.js

+ 1
- 9
modules/RTC/JitsiTrack.js View File

@@ -174,15 +174,7 @@ JitsiTrack.prototype._maybeFireTrackAttached = function (container) {
174 174
  */
175 175
 JitsiTrack.prototype.attach = function (container) {
176 176
     if(this.stream) {
177
-        // The container must be visible in order to play or attach the stream
178
-        // when Temasys plugin is in use
179
-        var containerSel = $(container);
180
-        if (RTCBrowserType.isTemasysPluginUsed() &&
181
-            !containerSel.is(':visible')) {
182
-            containerSel.show();
183
-        }
184
-        container
185
-            = RTCUtils.attachMediaStream(container, this.stream);
177
+        container = RTCUtils.attachMediaStream(container, this.stream);
186 178
     }
187 179
     this.containers.push(container);
188 180
 

+ 7
- 0
modules/RTC/RTCUtils.js View File

@@ -748,6 +748,13 @@ var RTCUtils = {
748 748
                             return;
749 749
                         }
750 750
 
751
+                        // The container must be visible in order to play or
752
+                        // attach the stream when Temasys plugin is in use
753
+                        var containerSel = $(element);
754
+                        if (RTCBrowserType.isTemasysPluginUsed()
755
+                                && !containerSel.is(':visible')) {
756
+                            containerSel.show();
757
+                        }
751 758
                         var isVideoStream = !!stream.getVideoTracks().length;
752 759
                         if (isVideoStream && !$(element).is(':visible')) {
753 760
                             throw new Error('video element must be visible to attach video stream');

Loading…
Cancel
Save