fix switching Large video on Safari

This commit is contained in:
isymchych 2016-01-25 18:31:56 +02:00
parent a0becb918e
commit d5dd34dede
1 changed files with 21 additions and 2 deletions

View File

@ -165,7 +165,6 @@ class VideoContainer extends LargeContainer {
get id () {
return getStreamOwnerId(this.stream);
return getStreamId(this.stream);
}
constructor (onPlay) {
@ -275,7 +274,27 @@ class VideoContainer extends LargeContainer {
this.stream = stream;
this.videoType = videoType;
stream.attach(this.$video);
if (RTCBrowserType.isTemasysPluginUsed()) {
// when Temasys plugin is in use stream.attach fails
// if element is not visible
// so we need to make it visible, but opaque
this.$wrapper.show().css({
opacity: 0
});
try {
stream.attach(this.$video);
} catch (e) {
console.error('failed to attach stream', e);
}
this.$wrapper.hide().css({
opacity: ''
});
} else {
stream.attach(this.$video);
}
let flipX = stream.isLocal() && !this.isScreenSharing();
this.$video.css({