Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

LargeVideoManager.js 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. /* global $, APP */
  2. /* eslint-disable no-unused-vars */
  3. import Logger from '@jitsi/logger';
  4. import React from 'react';
  5. import ReactDOM from 'react-dom';
  6. import { I18nextProvider } from 'react-i18next';
  7. import { Provider } from 'react-redux';
  8. import { createScreenSharingIssueEvent, sendAnalytics } from '../../../react/features/analytics';
  9. import { Avatar } from '../../../react/features/base/avatar';
  10. import theme from '../../../react/features/base/components/themes/participantsPaneTheme.json';
  11. import { getSourceNameSignalingFeatureFlag } from '../../../react/features/base/config';
  12. import { i18next } from '../../../react/features/base/i18n';
  13. import { MEDIA_TYPE, VIDEO_TYPE } from '../../../react/features/base/media';
  14. import {
  15. getParticipantById,
  16. getParticipantDisplayName
  17. } from '../../../react/features/base/participants';
  18. import { getTrackByMediaTypeAndParticipant } from '../../../react/features/base/tracks';
  19. import { CHAT_SIZE } from '../../../react/features/chat';
  20. import {
  21. isParticipantConnectionStatusActive,
  22. isParticipantConnectionStatusInactive,
  23. isParticipantConnectionStatusInterrupted,
  24. isTrackStreamingStatusActive,
  25. isTrackStreamingStatusInactive,
  26. isTrackStreamingStatusInterrupted
  27. } from '../../../react/features/connection-indicator/functions';
  28. import { FILMSTRIP_BREAKPOINT, isFilmstripResizable, getVerticalViewMaxWidth } from '../../../react/features/filmstrip';
  29. import {
  30. updateKnownLargeVideoResolution
  31. } from '../../../react/features/large-video/actions';
  32. import { getParticipantsPaneOpen } from '../../../react/features/participants-pane/functions';
  33. import { PresenceLabel } from '../../../react/features/presence-status';
  34. import { shouldDisplayTileView } from '../../../react/features/video-layout';
  35. /* eslint-enable no-unused-vars */
  36. import { createDeferred } from '../../util/helpers';
  37. import AudioLevels from '../audio_levels/AudioLevels';
  38. import { VideoContainer, VIDEO_CONTAINER_TYPE } from './VideoContainer';
  39. const logger = Logger.getLogger(__filename);
  40. const DESKTOP_CONTAINER_TYPE = 'desktop';
  41. /**
  42. * Manager for all Large containers.
  43. */
  44. export default class LargeVideoManager {
  45. /**
  46. * Checks whether given container is a {@link VIDEO_CONTAINER_TYPE}.
  47. * FIXME currently this is a workaround for the problem where video type is
  48. * mixed up with container type.
  49. * @param {string} containerType
  50. * @return {boolean}
  51. */
  52. static isVideoContainer(containerType) {
  53. return containerType === VIDEO_CONTAINER_TYPE
  54. || containerType === DESKTOP_CONTAINER_TYPE;
  55. }
  56. /**
  57. *
  58. */
  59. constructor() {
  60. /**
  61. * The map of <tt>LargeContainer</tt>s where the key is the video
  62. * container type.
  63. * @type {Object.<string, LargeContainer>}
  64. */
  65. this.containers = {};
  66. this.state = VIDEO_CONTAINER_TYPE;
  67. // FIXME: We are passing resizeContainer as parameter which is calling
  68. // Container.resize. Probably there's better way to implement this.
  69. this.videoContainer = new VideoContainer(() => this.resizeContainer(VIDEO_CONTAINER_TYPE));
  70. this.addContainer(VIDEO_CONTAINER_TYPE, this.videoContainer);
  71. // use the same video container to handle desktop tracks
  72. this.addContainer(DESKTOP_CONTAINER_TYPE, this.videoContainer);
  73. /**
  74. * The preferred width passed as an argument to {@link updateContainerSize}.
  75. *
  76. * @type {number|undefined}
  77. */
  78. this.preferredWidth = undefined;
  79. /**
  80. * The preferred height passed as an argument to {@link updateContainerSize}.
  81. *
  82. * @type {number|undefined}
  83. */
  84. this.preferredHeight = undefined;
  85. /**
  86. * The calculated width that will be used for the large video.
  87. * @type {number}
  88. */
  89. this.width = 0;
  90. /**
  91. * The calculated height that will be used for the large video.
  92. * @type {number}
  93. */
  94. this.height = 0;
  95. /**
  96. * Cache the aspect ratio of the video displayed to detect changes to
  97. * the aspect ratio on video resize events.
  98. *
  99. * @type {number}
  100. */
  101. this._videoAspectRatio = 0;
  102. this.$container = $('#largeVideoContainer');
  103. this.$container.css({
  104. display: 'inline-block'
  105. });
  106. this.$container.hover(
  107. e => this.onHoverIn(e),
  108. e => this.onHoverOut(e)
  109. );
  110. // Bind event handler so it is only bound once for every instance.
  111. this._onVideoResolutionUpdate
  112. = this._onVideoResolutionUpdate.bind(this);
  113. this.videoContainer.addResizeListener(this._onVideoResolutionUpdate);
  114. this._dominantSpeakerAvatarContainer
  115. = document.getElementById('dominantSpeakerAvatarContainer');
  116. }
  117. /**
  118. * Removes any listeners registered on child components, including
  119. * React Components.
  120. *
  121. * @returns {void}
  122. */
  123. destroy() {
  124. this.videoContainer.removeResizeListener(
  125. this._onVideoResolutionUpdate);
  126. this.removePresenceLabel();
  127. ReactDOM.unmountComponentAtNode(this._dominantSpeakerAvatarContainer);
  128. this.$container.css({ display: 'none' });
  129. }
  130. /**
  131. *
  132. */
  133. onHoverIn(e) {
  134. if (!this.state) {
  135. return;
  136. }
  137. const container = this.getCurrentContainer();
  138. container.onHoverIn(e);
  139. }
  140. /**
  141. *
  142. */
  143. onHoverOut(e) {
  144. if (!this.state) {
  145. return;
  146. }
  147. const container = this.getCurrentContainer();
  148. container.onHoverOut(e);
  149. }
  150. /**
  151. *
  152. */
  153. get id() {
  154. const container = this.getCurrentContainer();
  155. // If a user switch for large video is in progress then provide what
  156. // will be the end result of the update.
  157. if (this.updateInProcess
  158. && this.newStreamData
  159. && this.newStreamData.id !== container.id) {
  160. return this.newStreamData.id;
  161. }
  162. return container.id;
  163. }
  164. /**
  165. *
  166. */
  167. scheduleLargeVideoUpdate() {
  168. if (this.updateInProcess || !this.newStreamData) {
  169. return;
  170. }
  171. this.updateInProcess = true;
  172. // Include hide()/fadeOut only if we're switching between users
  173. // eslint-disable-next-line eqeqeq
  174. const container = this.getCurrentContainer();
  175. const isUserSwitch = this.newStreamData.id !== container.id;
  176. const preUpdate = isUserSwitch ? container.hide() : Promise.resolve();
  177. preUpdate.then(() => {
  178. const { id, stream, videoType, resolve } = this.newStreamData;
  179. // FIXME this does not really make sense, because the videoType
  180. // (camera or desktop) is a completely different thing than
  181. // the video container type (Etherpad, SharedVideo, VideoContainer).
  182. const isVideoContainer = LargeVideoManager.isVideoContainer(videoType);
  183. this.newStreamData = null;
  184. logger.info(`hover in ${id}`);
  185. this.state = videoType;
  186. // eslint-disable-next-line no-shadow
  187. const container = this.getCurrentContainer();
  188. container.setStream(id, stream, videoType);
  189. // change the avatar url on large
  190. this.updateAvatar();
  191. const isVideoMuted = !stream || stream.isMuted();
  192. const state = APP.store.getState();
  193. const participant = getParticipantById(state, id);
  194. const connectionStatus = participant?.connectionStatus;
  195. let isVideoRenderable;
  196. if (getSourceNameSignalingFeatureFlag(state)) {
  197. const videoTrack = getTrackByMediaTypeAndParticipant(
  198. state['features/base/tracks'], MEDIA_TYPE.VIDEO, id);
  199. isVideoRenderable = !isVideoMuted
  200. && (APP.conference.isLocalId(id) || isTrackStreamingStatusActive(videoTrack));
  201. } else {
  202. isVideoRenderable = !isVideoMuted
  203. && (APP.conference.isLocalId(id) || isParticipantConnectionStatusActive(participant));
  204. }
  205. const isAudioOnly = APP.conference.isAudioOnly();
  206. const showAvatar
  207. = isVideoContainer
  208. && ((isAudioOnly && videoType !== VIDEO_TYPE.DESKTOP) || !isVideoRenderable);
  209. let promise;
  210. // do not show stream if video is muted
  211. // but we still should show watermark
  212. if (showAvatar) {
  213. this.showWatermark(true);
  214. // If the intention of this switch is to show the avatar
  215. // we need to make sure that the video is hidden
  216. promise = container.hide();
  217. if ((!shouldDisplayTileView(state) || participant?.pinned) // In theory the tile view may not be
  218. // enabled yet when we auto pin the participant.
  219. && participant && !participant.local && !participant.isFakeParticipant) {
  220. // remote participant only
  221. const track = getTrackByMediaTypeAndParticipant(
  222. state['features/base/tracks'], MEDIA_TYPE.VIDEO, id);
  223. const isScreenSharing = track?.videoType === 'desktop';
  224. if (isScreenSharing) {
  225. // send the event
  226. sendAnalytics(createScreenSharingIssueEvent({
  227. source: 'large-video',
  228. connectionStatus,
  229. isVideoMuted,
  230. isAudioOnly,
  231. isVideoContainer,
  232. videoType
  233. }));
  234. }
  235. }
  236. } else {
  237. promise = container.show();
  238. }
  239. // show the avatar on large if needed
  240. container.showAvatar(showAvatar);
  241. // Clean up audio level after previous speaker.
  242. if (showAvatar) {
  243. this.updateLargeVideoAudioLevel(0);
  244. }
  245. let messageKey;
  246. if (getSourceNameSignalingFeatureFlag(state)) {
  247. const videoTrack = getTrackByMediaTypeAndParticipant(
  248. state['features/base/tracks'], MEDIA_TYPE.VIDEO, id);
  249. messageKey = isTrackStreamingStatusInactive(videoTrack) ? 'connection.LOW_BANDWIDTH' : null;
  250. } else {
  251. messageKey = isParticipantConnectionStatusInactive(participant) ? 'connection.LOW_BANDWIDTH' : null;
  252. }
  253. // Do not show connection status message in the audio only mode,
  254. // because it's based on the video playback status.
  255. const overrideAndHide = APP.conference.isAudioOnly();
  256. this.updateParticipantConnStatusIndication(
  257. id,
  258. !overrideAndHide && messageKey);
  259. // Change the participant id the presence label is listening to.
  260. this.updatePresenceLabel(id);
  261. this.videoContainer.positionRemoteStatusMessages();
  262. // resolve updateLargeVideo promise after everything is done
  263. promise.then(resolve);
  264. return promise;
  265. }).then(() => {
  266. // after everything is done check again if there are any pending
  267. // new streams.
  268. this.updateInProcess = false;
  269. this.scheduleLargeVideoUpdate();
  270. });
  271. }
  272. /**
  273. * Shows/hides notification about participant's connectivity issues to be
  274. * shown on the large video area.
  275. *
  276. * @param {string} id the id of remote participant(MUC nickname)
  277. * @param {string|null} messageKey the i18n key of the message which will be
  278. * displayed on the large video or <tt>null</tt> to hide it.
  279. *
  280. * @private
  281. */
  282. updateParticipantConnStatusIndication(id, messageKey) {
  283. const state = APP.store.getState();
  284. if (messageKey) {
  285. // Get user's display name
  286. const displayName
  287. = getParticipantDisplayName(state, id);
  288. this._setRemoteConnectionMessage(
  289. messageKey,
  290. { displayName });
  291. // Show it now only if the VideoContainer is on top
  292. this.showRemoteConnectionMessage(
  293. LargeVideoManager.isVideoContainer(this.state));
  294. } else {
  295. // Hide the message
  296. this.showRemoteConnectionMessage(false);
  297. }
  298. }
  299. /**
  300. * Update large video.
  301. * Switches to large video even if previously other container was visible.
  302. * @param userID the userID of the participant associated with the stream
  303. * @param {JitsiTrack?} stream new stream
  304. * @param {string?} videoType new video type
  305. * @returns {Promise}
  306. */
  307. updateLargeVideo(userID, stream, videoType) {
  308. if (this.newStreamData) {
  309. this.newStreamData.reject();
  310. }
  311. this.newStreamData = createDeferred();
  312. this.newStreamData.id = userID;
  313. this.newStreamData.stream = stream;
  314. this.newStreamData.videoType = videoType;
  315. this.scheduleLargeVideoUpdate();
  316. return this.newStreamData.promise;
  317. }
  318. /**
  319. * Update container size.
  320. */
  321. updateContainerSize(width, height) {
  322. if (typeof width === 'number') {
  323. this.preferredWidth = width;
  324. }
  325. if (typeof height === 'number') {
  326. this.preferredHeight = height;
  327. }
  328. let widthToUse = this.preferredWidth || window.innerWidth;
  329. const state = APP.store.getState();
  330. const { isOpen } = state['features/chat'];
  331. const { width: filmstripWidth, visible } = state['features/filmstrip'];
  332. const isParticipantsPaneOpen = getParticipantsPaneOpen(state);
  333. const resizableFilmstrip = isFilmstripResizable(state);
  334. if (isParticipantsPaneOpen) {
  335. widthToUse -= theme.participantsPaneWidth;
  336. }
  337. if (isOpen && window.innerWidth > 580) {
  338. /**
  339. * If chat state is open, we re-compute the container width
  340. * by subtracting the default width of the chat.
  341. */
  342. widthToUse -= CHAT_SIZE;
  343. }
  344. if (resizableFilmstrip && visible && filmstripWidth.current >= FILMSTRIP_BREAKPOINT) {
  345. widthToUse -= getVerticalViewMaxWidth(state);
  346. }
  347. this.width = widthToUse;
  348. this.height = this.preferredHeight || window.innerHeight;
  349. }
  350. /**
  351. * Resize Large container of specified type.
  352. * @param {string} type type of container which should be resized.
  353. * @param {boolean} [animate=false] if resize process should be animated.
  354. */
  355. resizeContainer(type, animate = false) {
  356. const container = this.getContainer(type);
  357. container.resize(this.width, this.height, animate);
  358. }
  359. /**
  360. * Resize all Large containers.
  361. * @param {boolean} animate if resize process should be animated.
  362. */
  363. resize(animate) {
  364. // resize all containers
  365. Object.keys(this.containers)
  366. .forEach(type => this.resizeContainer(type, animate));
  367. }
  368. /**
  369. * Updates the src of the dominant speaker avatar
  370. */
  371. updateAvatar() {
  372. ReactDOM.render(
  373. <Provider store = { APP.store }>
  374. <Avatar
  375. id = "dominantSpeakerAvatar"
  376. participantId = { this.id }
  377. size = { 200 } />
  378. </Provider>,
  379. this._dominantSpeakerAvatarContainer
  380. );
  381. }
  382. /**
  383. * Updates the audio level indicator of the large video.
  384. *
  385. * @param lvl the new audio level to set
  386. */
  387. updateLargeVideoAudioLevel(lvl) {
  388. AudioLevels.updateLargeVideoAudioLevel('dominantSpeaker', lvl);
  389. }
  390. /**
  391. * Displays a message of the passed in participant id's presence status. The
  392. * message will not display if the remote connection message is displayed.
  393. *
  394. * @param {string} id - The participant ID whose associated user's presence
  395. * status should be displayed.
  396. * @returns {void}
  397. */
  398. updatePresenceLabel(id) {
  399. const isConnectionMessageVisible
  400. = $('#remoteConnectionMessage').is(':visible');
  401. if (isConnectionMessageVisible) {
  402. this.removePresenceLabel();
  403. return;
  404. }
  405. const presenceLabelContainer = $('#remotePresenceMessage');
  406. if (presenceLabelContainer.length) {
  407. ReactDOM.render(
  408. <Provider store = { APP.store }>
  409. <I18nextProvider i18n = { i18next }>
  410. <PresenceLabel
  411. participantID = { id }
  412. className = 'presence-label' />
  413. </I18nextProvider>
  414. </Provider>,
  415. presenceLabelContainer.get(0));
  416. }
  417. }
  418. /**
  419. * Removes the messages about the displayed participant's presence status.
  420. *
  421. * @returns {void}
  422. */
  423. removePresenceLabel() {
  424. const presenceLabelContainer = $('#remotePresenceMessage');
  425. if (presenceLabelContainer.length) {
  426. ReactDOM.unmountComponentAtNode(presenceLabelContainer.get(0));
  427. }
  428. }
  429. /**
  430. * Show or hide watermark.
  431. * @param {boolean} show
  432. */
  433. showWatermark(show) {
  434. $('.watermark').css('visibility', show ? 'visible' : 'hidden');
  435. }
  436. /**
  437. * Shows hides the "avatar" message which is to be displayed either in
  438. * the middle of the screen or below the avatar image.
  439. *
  440. * @param {boolean|undefined} [show=undefined] <tt>true</tt> to show
  441. * the avatar message or <tt>false</tt> to hide it. If not provided then
  442. * the connection status of the user currently on the large video will be
  443. * obtained form "APP.conference" and the message will be displayed if
  444. * the user's connection is either interrupted or inactive.
  445. */
  446. showRemoteConnectionMessage(show) {
  447. if (typeof show !== 'boolean') {
  448. const participant = getParticipantById(APP.store.getState(), this.id);
  449. const state = APP.store.getState();
  450. if (getSourceNameSignalingFeatureFlag(state)) {
  451. const videoTrack = getTrackByMediaTypeAndParticipant(
  452. state['features/base/tracks'], MEDIA_TYPE.VIDEO, this.id);
  453. // eslint-disable-next-line no-param-reassign
  454. show = !APP.conference.isLocalId(this.id)
  455. && (isTrackStreamingStatusInterrupted(videoTrack)
  456. || isTrackStreamingStatusInactive(videoTrack));
  457. } else {
  458. // eslint-disable-next-line no-param-reassign
  459. show = !APP.conference.isLocalId(this.id)
  460. && (isParticipantConnectionStatusInterrupted(participant)
  461. || isParticipantConnectionStatusInactive(participant));
  462. }
  463. }
  464. if (show) {
  465. $('#remoteConnectionMessage').css({ display: 'block' });
  466. } else {
  467. $('#remoteConnectionMessage').hide();
  468. }
  469. }
  470. /**
  471. * Updates the text which describes that the remote user is having
  472. * connectivity issues.
  473. *
  474. * @param {string} msgKey the translation key which will be used to get
  475. * the message text.
  476. * @param {object} msgOptions translation options object.
  477. *
  478. * @private
  479. */
  480. _setRemoteConnectionMessage(msgKey, msgOptions) {
  481. if (msgKey) {
  482. $('#remoteConnectionMessage')
  483. .attr('data-i18n', msgKey)
  484. .attr('data-i18n-options', JSON.stringify(msgOptions));
  485. APP.translation.translateElement(
  486. $('#remoteConnectionMessage'), msgOptions);
  487. }
  488. }
  489. /**
  490. * Add container of specified type.
  491. * @param {string} type container type
  492. * @param {LargeContainer} container container to add.
  493. */
  494. addContainer(type, container) {
  495. if (this.containers[type]) {
  496. throw new Error(`container of type ${type} already exist`);
  497. }
  498. this.containers[type] = container;
  499. this.resizeContainer(type);
  500. }
  501. /**
  502. * Get Large container of specified type.
  503. * @param {string} type container type.
  504. * @returns {LargeContainer}
  505. */
  506. getContainer(type) {
  507. const container = this.containers[type];
  508. if (!container) {
  509. throw new Error(`container of type ${type} doesn't exist`);
  510. }
  511. return container;
  512. }
  513. /**
  514. * Returns {@link LargeContainer} for the current {@link state}
  515. *
  516. * @return {LargeContainer}
  517. *
  518. * @throws an <tt>Error</tt> if there is no container for the current
  519. * {@link state}.
  520. */
  521. getCurrentContainer() {
  522. return this.getContainer(this.state);
  523. }
  524. /**
  525. * Returns type of the current {@link LargeContainer}
  526. * @return {string}
  527. */
  528. getCurrentContainerType() {
  529. return this.state;
  530. }
  531. /**
  532. * Remove Large container of specified type.
  533. * @param {string} type container type.
  534. */
  535. removeContainer(type) {
  536. if (!this.containers[type]) {
  537. throw new Error(`container of type ${type} doesn't exist`);
  538. }
  539. delete this.containers[type];
  540. }
  541. /**
  542. * Show Large container of specified type.
  543. * Does nothing if such container is already visible.
  544. * @param {string} type container type.
  545. * @returns {Promise}
  546. */
  547. showContainer(type) {
  548. if (this.state === type) {
  549. return Promise.resolve();
  550. }
  551. const oldContainer = this.containers[this.state];
  552. // FIXME when video is being replaced with other content we need to hide
  553. // companion icons/messages. It would be best if the container would
  554. // be taking care of it by itself, but that is a bigger refactoring
  555. if (LargeVideoManager.isVideoContainer(this.state)) {
  556. this.showWatermark(false);
  557. this.showRemoteConnectionMessage(false);
  558. }
  559. oldContainer.hide();
  560. this.state = type;
  561. const container = this.getContainer(type);
  562. return container.show().then(() => {
  563. if (LargeVideoManager.isVideoContainer(type)) {
  564. // FIXME when video appears on top of other content we need to
  565. // show companion icons/messages. It would be best if
  566. // the container would be taking care of it by itself, but that
  567. // is a bigger refactoring
  568. this.showWatermark(true);
  569. // "avatar" and "video connection" can not be displayed both
  570. // at the same time, but the latter is of higher priority and it
  571. // will hide the avatar one if will be displayed.
  572. this.showRemoteConnectionMessage(/* fetch the current state */);
  573. }
  574. });
  575. }
  576. /**
  577. * Changes the flipX state of the local video.
  578. * @param val {boolean} true if flipped.
  579. */
  580. onLocalFlipXChange(val) {
  581. this.videoContainer.setLocalFlipX(val);
  582. }
  583. /**
  584. * Dispatches an action to update the known resolution state of the large video and adjusts container sizes when the
  585. * resolution changes.
  586. *
  587. * @private
  588. * @returns {void}
  589. */
  590. _onVideoResolutionUpdate() {
  591. const { height, width } = this.videoContainer.getStreamSize();
  592. const { resolution } = APP.store.getState()['features/large-video'];
  593. if (height !== resolution) {
  594. APP.store.dispatch(updateKnownLargeVideoResolution(height));
  595. }
  596. const currentAspectRatio = height === 0 ? 0 : width / height;
  597. if (this._videoAspectRatio !== currentAspectRatio) {
  598. this._videoAspectRatio = currentAspectRatio;
  599. this.resize();
  600. }
  601. }
  602. }