diff --git a/packages/gallery/src/components/item/videos/getStyle.js b/packages/gallery/src/components/item/videos/getStyle.js index fb427ed1c..7faeec5fd 100644 --- a/packages/gallery/src/components/item/videos/getStyle.js +++ b/packages/gallery/src/components/item/videos/getStyle.js @@ -1,6 +1,4 @@ -module.exports = getStyle; - -function getStyle(isCrop, isWiderThenContainer) { +export function getStyle(isCrop, isWiderThenContainer) { const CALC = 'calc(100% + 1px)'; return isCrop ? getCrop() : getNonCrop(); diff --git a/packages/gallery/src/components/item/videos/videoItem.js b/packages/gallery/src/components/item/videos/videoItem.js index 80c86a7b1..32837eef6 100644 --- a/packages/gallery/src/components/item/videos/videoItem.js +++ b/packages/gallery/src/components/item/videos/videoItem.js @@ -1,7 +1,7 @@ import React from 'react'; import { GALLERY_CONSTS, window, utils } from 'pro-gallery-lib'; import { shouldCreateVideoPlaceholder } from '../itemHelper'; -import getStyle from './getStyle'; +import { getStyle } from './getStyle'; class VideoItem extends React.Component { constructor(props) { @@ -166,7 +166,7 @@ class VideoItem extends React.Component { const attributes = { controlsList: 'nodownload', - disablePictureInPicture: 'true', + disablePictureInPicture: true, muted: !this.props.options.videoSound, preload: 'metadata', style: getStyle(isCrop, isWiderThenContainer),