ref(filmstirp): remove animate flag from resizeThumbnails

The flag is always false.
This commit is contained in:
Leonard Kim 2018-04-10 13:03:44 -07:00 committed by Дамян Минков
parent 8363f3cfeb
commit 2ce3c2d459
4 changed files with 9 additions and 12 deletions

View File

@ -286,7 +286,7 @@ export default class SharedVideoManager {
thumb.setDisplayName('YouTube'); thumb.setDisplayName('YouTube');
VideoLayout.addRemoteVideoContainer(self.url, thumb); VideoLayout.addRemoteVideoContainer(self.url, thumb);
VideoLayout.resizeThumbnails(false, true); VideoLayout.resizeThumbnails(true);
const iframe = player.getIframe(); const iframe = player.getIframe();

View File

@ -438,12 +438,11 @@ const Filmstrip = {
* Resizes thumbnails * Resizes thumbnails
* @param local * @param local
* @param remote * @param remote
* @param animate
* @param forceUpdate * @param forceUpdate
* @returns {Promise} * @returns {Promise}
*/ */
// eslint-disable-next-line max-params, no-unused-vars // eslint-disable-next-line max-params
resizeThumbnails(local, remote, animate = false, forceUpdate = false) { resizeThumbnails(local, remote, forceUpdate = false) {
const thumbs = this.getThumbs(!forceUpdate); const thumbs = this.getThumbs(!forceUpdate);
if (thumbs.localThumb) { if (thumbs.localThumb) {

View File

@ -95,7 +95,7 @@ RemoteVideo.prototype.addRemoteVideoContainer = function() {
this.updateRemoteVideoMenu(); this.updateRemoteVideoMenu();
this.VideoLayout.resizeThumbnails(false, true); this.VideoLayout.resizeThumbnails(true);
this.addAudioLevelIndicator(); this.addAudioLevelIndicator();

View File

@ -74,7 +74,7 @@ const VideoLayout = {
// if we do not resize the thumbs here, if there is no video device // if we do not resize the thumbs here, if there is no video device
// the local video thumb maybe one pixel // the local video thumb maybe one pixel
this.resizeThumbnails(false, true); this.resizeThumbnails(true);
this.handleVideoThumbClicked = this.handleVideoThumbClicked.bind(this); this.handleVideoThumbClicked = this.handleVideoThumbClicked.bind(this);
@ -468,7 +468,7 @@ const VideoLayout = {
remoteVideo.setVideoType(VIDEO_CONTAINER_TYPE); remoteVideo.setVideoType(VIDEO_CONTAINER_TYPE);
} }
VideoLayout.resizeThumbnails(false, true); VideoLayout.resizeThumbnails(true);
// Initialize the view // Initialize the view
remoteVideo.updateView(); remoteVideo.updateView();
@ -480,7 +480,7 @@ const VideoLayout = {
logger.info(`${resourceJid} video is now active`, videoElement); logger.info(`${resourceJid} video is now active`, videoElement);
VideoLayout.resizeThumbnails( VideoLayout.resizeThumbnails(
false, false, () => { false, () => {
if (videoElement) { if (videoElement) {
$(videoElement).show(); $(videoElement).show();
} }
@ -575,14 +575,12 @@ const VideoLayout = {
* Resizes thumbnails. * Resizes thumbnails.
*/ */
resizeThumbnails( resizeThumbnails(
animate = false,
forceUpdate = false, forceUpdate = false,
onComplete = null) { onComplete = null) {
const { localVideo, remoteVideo } const { localVideo, remoteVideo }
= Filmstrip.calculateThumbnailSize(); = Filmstrip.calculateThumbnailSize();
Filmstrip.resizeThumbnails(localVideo, remoteVideo, Filmstrip.resizeThumbnails(localVideo, remoteVideo, forceUpdate);
animate, forceUpdate);
if (onComplete && typeof onComplete === 'function') { if (onComplete && typeof onComplete === 'function') {
onComplete(); onComplete();
@ -878,7 +876,7 @@ const VideoLayout = {
} }
// Resize the thumbnails first. // Resize the thumbnails first.
this.resizeThumbnails(false, forceUpdate); this.resizeThumbnails(forceUpdate);
// Resize the video area element. // Resize the video area element.
$('#videospace').animate({ $('#videospace').animate({