From fe0afe380981e1fbf420bddbb3fa2d501d05c909 Mon Sep 17 00:00:00 2001 From: liatvi Date: Tue, 12 Mar 2024 13:12:29 +0200 Subject: [PATCH] make videoItem use esm import V5 (#1200) --- packages/gallery/src/components/item/videos/getStyle.js | 6 +++--- packages/gallery/src/components/item/videos/videoItem.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/gallery/src/components/item/videos/getStyle.js b/packages/gallery/src/components/item/videos/getStyle.js index fb427ed1cb..cfa687fb50 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 43e2195373..dba7476243 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),