Merge pull request #508 from isymchych/fix-unmute

LargeVideo: detach previous stream when attaching new one
This commit is contained in:
Paweł Domas 2016-02-19 10:11:25 -06:00
commit 93d5497c76
1 changed files with 7 additions and 1 deletions

View File

@ -270,11 +270,17 @@ class VideoContainer extends LargeContainer {
* @param {string} videoType video type * @param {string} videoType video type
*/ */
setStream (stream, videoType) { setStream (stream, videoType) {
// detach old stream
if (this.stream) {
this.stream.detach(this.$video[0]);
}
this.stream = stream; this.stream = stream;
this.videoType = videoType; this.videoType = videoType;
if(!stream) if (!stream) {
return; return;
}
stream.attach(this.$video[0]); stream.attach(this.$video[0]);