@gravity-ui/page-constructor 4.25.0 → 4.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ unpredictable css rules order in build */
14
14
  bottom: 0;
15
15
  opacity: 0;
16
16
  transition: opacity 300ms ease 3s;
17
+ z-index: 1;
17
18
  }
18
19
  .pc-CustomBarControls__wrapper_shown {
19
20
  opacity: 1;
@@ -38,7 +38,7 @@ exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
38
38
  const [started, setStarted] = (0, react_1.useState)(autoPlay);
39
39
  const [ended, setEnded] = (0, react_1.useState)(false);
40
40
  const [isMounted, setIsMounted] = (0, react_1.useState)(false);
41
- const [hovered, setHovered] = (0, react_1.useState)(false);
41
+ const [hovered, setHovered] = (0, react_1.useState)(isMobile);
42
42
  (0, hooks_1.useMount)(() => setIsMounted(true));
43
43
  const videoSrc = (0, react_1.useMemo)(() => (0, utils_2.checkYoutubeVideos)(src), [src]);
44
44
  const eventsArray = (0, react_1.useMemo)(() => {
@@ -219,7 +219,15 @@ exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
219
219
  }, className), ref: ref, onClick: handleClick, onMouseEnter: onFocusIn, onMouseLeave: onFocusOut, onFocus: onFocusIn, onBlur: onFocusOut }, isMounted ? (react_1.default.createElement(react_1.Fragment, null,
220
220
  react_1.default.createElement(react_player_1.default, { className: b('player'), url: videoSrc, muted: muted, controls: controls === models_1.MediaVideoControlsType.Default, height: currentHeight || '100%', width: width || '100%', light: previewImgUrl, playing: isPlaying, playIcon: playIcon, progressInterval: FPS, onClickPreview: handleClickPreview, onStart: onStart, onReady: setPlayerRef, onPlay: onPlay, onPause: autoPlay && customControlsType !== models_1.CustomControlsType.WithMuteButton
221
221
  ? undefined
222
- : onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel }),
222
+ : onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel, config: {
223
+ file: {
224
+ attributes: {
225
+ pip: isMobile ? 'false' : undefined,
226
+ playsinline: isMobile ? '' : undefined,
227
+ disablepictureinpicture: isMobile ? '' : undefined,
228
+ },
229
+ },
230
+ } }),
223
231
  controls === models_1.MediaVideoControlsType.Custom && (react_1.default.createElement(CustomBarControls_1.default, { className: customBarControlsClassName, mute: {
224
232
  isMuted: muted,
225
233
  changeMute: (event) => {
@@ -14,6 +14,7 @@ unpredictable css rules order in build */
14
14
  bottom: 0;
15
15
  opacity: 0;
16
16
  transition: opacity 300ms ease 3s;
17
+ z-index: 1;
17
18
  }
18
19
  .pc-CustomBarControls__wrapper_shown {
19
20
  opacity: 1;
@@ -35,7 +35,7 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
35
35
  const [started, setStarted] = useState(autoPlay);
36
36
  const [ended, setEnded] = useState(false);
37
37
  const [isMounted, setIsMounted] = useState(false);
38
- const [hovered, setHovered] = useState(false);
38
+ const [hovered, setHovered] = useState(isMobile);
39
39
  useMount(() => setIsMounted(true));
40
40
  const videoSrc = useMemo(() => checkYoutubeVideos(src), [src]);
41
41
  const eventsArray = useMemo(() => {
@@ -216,7 +216,15 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
216
216
  }, className), ref: ref, onClick: handleClick, onMouseEnter: onFocusIn, onMouseLeave: onFocusOut, onFocus: onFocusIn, onBlur: onFocusOut }, isMounted ? (React.createElement(Fragment, null,
217
217
  React.createElement(ReactPlayer, { className: b('player'), url: videoSrc, muted: muted, controls: controls === MediaVideoControlsType.Default, height: currentHeight || '100%', width: width || '100%', light: previewImgUrl, playing: isPlaying, playIcon: playIcon, progressInterval: FPS, onClickPreview: handleClickPreview, onStart: onStart, onReady: setPlayerRef, onPlay: onPlay, onPause: autoPlay && customControlsType !== CustomControlsType.WithMuteButton
218
218
  ? undefined
219
- : onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel }),
219
+ : onPause, onProgress: onProgress, onEnded: onEnded, "aria-label": ariaLabel, config: {
220
+ file: {
221
+ attributes: {
222
+ pip: isMobile ? 'false' : undefined,
223
+ playsinline: isMobile ? '' : undefined,
224
+ disablepictureinpicture: isMobile ? '' : undefined,
225
+ },
226
+ },
227
+ } }),
220
228
  controls === MediaVideoControlsType.Custom && (React.createElement(CustomBarControls, { className: customBarControlsClassName, mute: {
221
229
  isMuted: muted,
222
230
  changeMute: (event) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "4.25.0",
3
+ "version": "4.25.1",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {