|
@@ -1,3 +1,4 @@
|
|
1
|
+var logger = require("jitsi-meet-logger").getLogger(__filename);
|
1
|
2
|
var RTCBrowserType = require("./RTCBrowserType");
|
2
|
3
|
var JitsiTrackEvents = require("../../JitsiTrackEvents");
|
3
|
4
|
var EventEmitter = require("events");
|
|
@@ -154,6 +155,9 @@ JitsiTrack.prototype.unmute = function () {
|
154
|
155
|
* Note that Temasys plugin will replace original audio/video element with
|
155
|
156
|
* 'object' when stream is being attached to the container for the first time.
|
156
|
157
|
*
|
|
158
|
+ * * NOTE * if given container element is not visible when the stream is being
|
|
159
|
+ * attached it will be shown back given that Temasys plugin is currently in use.
|
|
160
|
+ *
|
157
|
161
|
* @param container the HTML container which can be 'video' or 'audio' element.
|
158
|
162
|
* It can also be 'object' element if Temasys plugin is in use and this
|
159
|
163
|
* method has been called previously on video or audio HTML element.
|
|
@@ -162,8 +166,17 @@ JitsiTrack.prototype.unmute = function () {
|
162
|
166
|
* library. That's the case when Temasys plugin is in use.
|
163
|
167
|
*/
|
164
|
168
|
JitsiTrack.prototype.attach = function (container) {
|
165
|
|
- if(this.stream)
|
166
|
|
- container = require("./RTCUtils").attachMediaStream(container, this.stream);
|
|
169
|
+ if(this.stream) {
|
|
170
|
+ // The container must be visible in order to play or attach the stream
|
|
171
|
+ // when Temasys plugin is in use
|
|
172
|
+ var containerSel = $(container);
|
|
173
|
+ if (RTCBrowserType.isTemasysPluginUsed() &&
|
|
174
|
+ !containerSel.is(':visible')) {
|
|
175
|
+ containerSel.show();
|
|
176
|
+ }
|
|
177
|
+ container
|
|
178
|
+ = require("./RTCUtils").attachMediaStream(container, this.stream);
|
|
179
|
+ }
|
167
|
180
|
this.containers.push(container);
|
168
|
181
|
return container;
|
169
|
182
|
}
|