diff --git a/packages/gallery/src/components/item/videos/getStyle.js b/packages/gallery/src/components/item/videos/getStyle.js index fb427ed1c..cfa687fb5 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(); @@ -26,3 +24,5 @@ function getStyle(isCrop, isWiderThenContainer) { }; } } + +export default getStyle; diff --git a/packages/gallery/src/components/item/videos/videoItem.js b/packages/gallery/src/components/item/videos/videoItem.js index 43e219537..dba747624 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, optionsMap } from 'pro-gallery-lib'; import { shouldCreateVideoPlaceholder } from '../itemHelper'; -import getStyle from './getStyle'; +import { getStyle } from './getStyle'; class VideoItem extends React.Component { constructor(props) { @@ -140,7 +140,7 @@ class VideoItem extends React.Component { const attributes = { controlsList: 'nodownload', - disablePictureInPicture: 'true', + disablePictureInPicture: true, muted: !this.props.options[optionsMap.behaviourParams.item.video.volume], preload: 'metadata', style: getStyle(isCrop, isWiderThenContainer),