|  | @@ -147,24 +147,21 @@ RemoteVideo.prototype.removeRemoteStreamElement = function (stream, isVideo, id)
 | 
		
	
		
			
			| 147 | 147 |      select.removed = true;
 | 
		
	
		
			
			| 148 | 148 |      select.remove();
 | 
		
	
		
			
			| 149 | 149 |  
 | 
		
	
		
			
			| 150 |  | -    var audioCount = $('#' + this.videoSpanId + '>audio').length;
 | 
		
	
		
			
			| 151 |  | -    var videoCount = $('#' + this.videoSpanId + '>' + APP.RTC.getVideoElementName()).length;
 | 
		
	
		
			
			| 152 |  | -
 | 
		
	
		
			
			| 153 |  | -    if (!audioCount && !videoCount) {
 | 
		
	
		
			
			| 154 |  | -        console.log("Remove whole user", this.videoSpanId);
 | 
		
	
		
			
			| 155 |  | -        if(this.connectionIndicator)
 | 
		
	
		
			
			| 156 |  | -            this.connectionIndicator.remove();
 | 
		
	
		
			
			| 157 |  | -        // Remove whole container
 | 
		
	
		
			
			| 158 |  | -        if (this.container.parentNode)
 | 
		
	
		
			
			| 159 |  | -            this.container.parentNode.removeChild(this.container);
 | 
		
	
		
			
			| 160 |  | -
 | 
		
	
		
			
			| 161 |  | -        this.VideoLayout.resizeThumbnails();
 | 
		
	
		
			
			| 162 |  | -    }
 | 
		
	
		
			
			| 163 |  | -
 | 
		
	
		
			
			| 164 | 150 |      if (isVideo)
 | 
		
	
		
			
			| 165 | 151 |          this.VideoLayout.updateRemovedVideo(this.getResourceJid());
 | 
		
	
		
			
			| 166 | 152 |  };
 | 
		
	
		
			
			| 167 | 153 |  
 | 
		
	
		
			
			|  | 154 | +/**
 | 
		
	
		
			
			|  | 155 | + * Removes RemoteVideo from the page.
 | 
		
	
		
			
			|  | 156 | + */
 | 
		
	
		
			
			|  | 157 | +RemoteVideo.prototype.remove = function () {
 | 
		
	
		
			
			|  | 158 | +    console.log("Remove thumbnail", this.peerJid);
 | 
		
	
		
			
			|  | 159 | +    this.removeConnectionIndicator();
 | 
		
	
		
			
			|  | 160 | +    // Remove whole container
 | 
		
	
		
			
			|  | 161 | +    if (this.container.parentNode)
 | 
		
	
		
			
			|  | 162 | +        this.container.parentNode.removeChild(this.container);
 | 
		
	
		
			
			|  | 163 | +};
 | 
		
	
		
			
			|  | 164 | +
 | 
		
	
		
			
			| 168 | 165 |  RemoteVideo.prototype.waitForPlayback = function (sel, stream) {
 | 
		
	
		
			
			| 169 | 166 |  
 | 
		
	
		
			
			| 170 | 167 |      var isVideo = stream.getVideoTracks().length > 0;
 | 
		
	
	
		
			
			|  | @@ -300,14 +297,14 @@ RemoteVideo.prototype.showPeerContainer = function (state) {
 | 
		
	
		
			
			| 300 | 297 |  };
 | 
		
	
		
			
			| 301 | 298 |  
 | 
		
	
		
			
			| 302 | 299 |  RemoteVideo.prototype.removeConnectionIndicator = function () {
 | 
		
	
		
			
			| 303 |  | -    if(this.connectionIndicator)
 | 
		
	
		
			
			|  | 300 | +    if (this.connectionIndicator)
 | 
		
	
		
			
			| 304 | 301 |          this.connectionIndicator.remove();
 | 
		
	
		
			
			| 305 |  | -}
 | 
		
	
		
			
			|  | 302 | +};
 | 
		
	
		
			
			| 306 | 303 |  
 | 
		
	
		
			
			| 307 | 304 |  RemoteVideo.prototype.hideConnectionIndicator = function () {
 | 
		
	
		
			
			| 308 |  | -    if(this.connectionIndicator)
 | 
		
	
		
			
			|  | 305 | +    if (this.connectionIndicator)
 | 
		
	
		
			
			| 309 | 306 |          this.connectionIndicator.hide();
 | 
		
	
		
			
			| 310 |  | -}
 | 
		
	
		
			
			|  | 307 | +};
 | 
		
	
		
			
			| 311 | 308 |  
 | 
		
	
		
			
			| 312 | 309 |  /**
 | 
		
	
		
			
			| 313 | 310 |   * Updates the remote video menu.
 |