diff --git a/src/components/calls/group/GroupCallParticipantVideo.tsx b/src/components/calls/group/GroupCallParticipantVideo.tsx index 8314c619e..f8415480c 100644 --- a/src/components/calls/group/GroupCallParticipantVideo.tsx +++ b/src/components/calls/group/GroupCallParticipantVideo.tsx @@ -6,10 +6,10 @@ import { withGlobal } from '../../../global'; import type { ApiChat, ApiUser } from '../../../api/types'; +import { GROUP_CALL_THUMB_VIDEO_DISABLED } from '../../../config'; import buildClassName from '../../../util/buildClassName'; import { selectChat, selectUser } from '../../../global/selectors'; import useLang from '../../../hooks/useLang'; -import { ENABLE_THUMBNAIL_VIDEO } from '../../../config'; import Avatar from '../../common/Avatar'; @@ -61,7 +61,7 @@ const GroupCallParticipantVideo: FC = ({ )} - {ENABLE_THUMBNAIL_VIDEO && ( + {!GROUP_CALL_THUMB_VIDEO_DISABLED && (
diff --git a/src/components/common/Avatar.tsx b/src/components/common/Avatar.tsx index f6a42a93c..b6cd23256 100644 --- a/src/components/common/Avatar.tsx +++ b/src/components/common/Avatar.tsx @@ -13,6 +13,7 @@ import type { AnimationLevel } from '../../types'; import { ApiMediaFormat } from '../../api/types'; import { ANIMATION_LEVEL_MAX, IS_TEST } from '../../config'; +import { VIDEO_AVATARS_DISABLED } from '../../util/environment'; import { getChatAvatarHash, getChatTitle, @@ -87,8 +88,10 @@ const Avatar: FC = ({ let imageHash: string | undefined; let videoHash: string | undefined; - const shouldShowVideo = isIntersecting && animationLevel === ANIMATION_LEVEL_MAX && withVideo && user?.isPremium - && user?.hasVideoAvatar; + const shouldShowVideo = ( + !VIDEO_AVATARS_DISABLED && animationLevel === ANIMATION_LEVEL_MAX + && isIntersecting && withVideo && user?.isPremium && user?.hasVideoAvatar + ); const profilePhoto = user?.fullInfo?.profilePhoto; const shouldLoadVideo = shouldShowVideo && profilePhoto?.isVideo; diff --git a/src/config.ts b/src/config.ts index bac96c712..f90a0ed6f 100644 --- a/src/config.ts +++ b/src/config.ts @@ -223,7 +223,7 @@ export const MAX_UPLOAD_FILEPART_SIZE = 524288; // Group calls export const GROUP_CALL_VOLUME_MULTIPLIER = 100; export const GROUP_CALL_DEFAULT_VOLUME = 100 * GROUP_CALL_VOLUME_MULTIPLIER; -export const ENABLE_THUMBNAIL_VIDEO = false; +export const GROUP_CALL_THUMB_VIDEO_DISABLED = true; export const DEFAULT_LIMITS: Record = { uploadMaxFileparts: [4000, 8000], diff --git a/src/util/environment.ts b/src/util/environment.ts index de8842886..226a8767e 100644 --- a/src/util/environment.ts +++ b/src/util/environment.ts @@ -118,6 +118,9 @@ export const MESSAGE_LIST_SENSITIVE_AREA = IS_SCROLL_PATCH_NEEDED ? 300 : 750; export const MAX_BUFFER_SIZE = (IS_ANDROID || IS_IOS ? 512 : 2000) * 1024 ** 2; // 512 OR 2000 MB +// TODO Turn on later as `!IS_IOS && !IS_ANDROID` +export const VIDEO_AVATARS_DISABLED = true; + function isLastEmojiVersionSupported() { const ALLOWABLE_CALCULATION_ERROR_SIZE = 5; const inlineEl = document.createElement('span');