Enables ContextIsolation
This commit is contained in:
parent
4bbf5eb5d4
commit
9374832ea4
83 changed files with 1009 additions and 1073 deletions
|
@ -16,6 +16,7 @@ import {
|
|||
} from '../../types/Attachment';
|
||||
import * as Errors from '../../types/errors';
|
||||
import * as log from '../../logging/log';
|
||||
import { useReducedMotion } from '../../hooks/useReducedMotion';
|
||||
|
||||
const MAX_GIF_REPEAT = 4;
|
||||
const MAX_GIF_TIME = 8;
|
||||
|
@ -28,8 +29,6 @@ export type Props = {
|
|||
readonly i18n: LocalizerType;
|
||||
readonly theme?: ThemeType;
|
||||
|
||||
readonly reducedMotion?: boolean;
|
||||
|
||||
onError(): void;
|
||||
showVisualAttachment(): void;
|
||||
kickOffAttachmentDownload(): void;
|
||||
|
@ -46,16 +45,12 @@ export function GIF(props: Props): JSX.Element {
|
|||
i18n,
|
||||
theme,
|
||||
|
||||
reducedMotion = Boolean(
|
||||
window.Accessibility && window.Accessibility.reducedMotionSetting
|
||||
),
|
||||
|
||||
onError,
|
||||
showVisualAttachment,
|
||||
kickOffAttachmentDownload,
|
||||
} = props;
|
||||
|
||||
const tapToPlay = reducedMotion;
|
||||
const tapToPlay = useReducedMotion();
|
||||
|
||||
const videoRef = useRef<HTMLVideoElement | null>(null);
|
||||
const { height, width } = getImageDimensions(attachment, size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue