Merge pull request #508 from isymchych/fix-unmute
LargeVideo: detach previous stream when attaching new one
This commit is contained in:
commit
93d5497c76
|
@ -270,11 +270,17 @@ class VideoContainer extends LargeContainer {
|
|||
* @param {string} videoType video type
|
||||
*/
|
||||
setStream (stream, videoType) {
|
||||
// detach old stream
|
||||
if (this.stream) {
|
||||
this.stream.detach(this.$video[0]);
|
||||
}
|
||||
|
||||
this.stream = stream;
|
||||
this.videoType = videoType;
|
||||
|
||||
if(!stream)
|
||||
if (!stream) {
|
||||
return;
|
||||
}
|
||||
|
||||
stream.attach(this.$video[0]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue