Video: Fix playing quicktime video inline

This commit is contained in:
Alexander Zinchuk 2022-01-28 02:12:13 +01:00
parent 479c4764eb
commit 11ff473b5d

View File

@ -73,11 +73,8 @@ export const IS_REQUEST_FULLSCREEN_SUPPORTED = 'requestFullscreen' in document.c
export const ARE_CALLS_SUPPORTED = !navigator.userAgent.includes('Firefox'); export const ARE_CALLS_SUPPORTED = !navigator.userAgent.includes('Firefox');
export const LAYERS_ANIMATION_NAME = IS_ANDROID ? 'slide-fade' : IS_IOS ? 'slide-layers' : 'push-slide'; export const LAYERS_ANIMATION_NAME = IS_ANDROID ? 'slide-fade' : IS_IOS ? 'slide-layers' : 'push-slide';
const TEST_VIDEO = document.createElement('video'); // `canPlayType(VIDEO_MOV_TYPE)` returns false negative at least for macOS Chrome and iOS Safari
export const IS_MOV_SUPPORTED = Boolean( export const IS_MOV_SUPPORTED = true;
TEST_VIDEO.canPlayType(VIDEO_MOV_TYPE).replace('no', '')
|| IS_IOS, // IOS reports '', but still plays .mov files
);
if (IS_MOV_SUPPORTED) SUPPORTED_VIDEO_CONTENT_TYPES.add(VIDEO_MOV_TYPE); if (IS_MOV_SUPPORTED) SUPPORTED_VIDEO_CONTENT_TYPES.add(VIDEO_MOV_TYPE);