Message: Fix webpage video-sticker preview in Safari
This commit is contained in:
parent
3e5bd0f488
commit
57dd323b78
@ -38,6 +38,7 @@ import {
|
||||
SUPPORTED_IMAGE_CONTENT_TYPES,
|
||||
SUPPORTED_VIDEO_CONTENT_TYPES,
|
||||
VIDEO_MOV_TYPE,
|
||||
VIDEO_WEBM_TYPE,
|
||||
} from '../../../config';
|
||||
import { pick } from '../../../util/iteratees';
|
||||
import { buildStickerFromDocument } from './symbols';
|
||||
@ -369,6 +370,11 @@ export function buildVideoFromDocument(document: GramJs.Document): ApiVideo | un
|
||||
id, mimeType, thumbs, size, attributes,
|
||||
} = document;
|
||||
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
if (mimeType === VIDEO_WEBM_TYPE && !(self as any).isWebmSupported) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
if (mimeType === VIDEO_MOV_TYPE && !(self as any).isMovSupported) {
|
||||
return undefined;
|
||||
|
||||
@ -134,6 +134,7 @@ export const MENU_TRANSITION_DURATION = 200;
|
||||
export const SLIDE_TRANSITION_DURATION = 450;
|
||||
|
||||
export const VIDEO_MOV_TYPE = 'video/quicktime';
|
||||
export const VIDEO_WEBM_TYPE = 'video/webm';
|
||||
|
||||
export const SUPPORTED_IMAGE_CONTENT_TYPES = new Set([
|
||||
'image/png', 'image/gif', 'image/jpeg',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user