@cntrl-site/sdk-nextjs 1.8.24 → 1.8.26

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.
@@ -64,14 +64,14 @@ const SectionVideo = ({ container, sectionId, media }) => {
64
64
  overflow: 'hidden',
65
65
  width: '100%'
66
66
  }, children: [(0, jsx_runtime_1.jsx)("video", { ref: setVideo, autoPlay: play === 'auto', loop: true, style: {
67
- opacity: !isPlaying && play === 'on-click' && coverUrl ? 0 : 1,
67
+ opacity: !isClickedOnCover && play === 'on-click' && coverUrl ? 0 : 1,
68
68
  objectFit: isContainHeight ? 'cover' : (size !== null && size !== void 0 ? size : 'cover'),
69
69
  width: isContainHeight && !isVideoWidthOverflow ? 'auto' : '100%',
70
70
  transform: isContainHeight ? 'translateX(-50%)' : 'none',
71
71
  left: isContainHeight ? '50%' : (hasOffsetX ? `${offsetX * 100}vw` : '0'),
72
72
  height: '100%',
73
73
  position: 'relative'
74
- }, controls: play === 'on-click', muted: play === 'auto', playsInline: true, preload: "auto", className: `video-background-${sectionId}`, onPlay: () => setIsPlaying(true), onPause: () => setIsPlaying(false), children: (0, jsx_runtime_1.jsx)("source", { src: `${url}` }) }), play === 'on-click' && !isPlaying && ((0, jsx_runtime_1.jsx)("div", { className: `video-background-${sectionId}-cover-container`, style: {
74
+ }, controls: play === 'on-click', muted: play === 'auto', playsInline: true, preload: "auto", className: `video-background-${sectionId}`, onPlay: () => setIsPlaying(true), onPause: () => setIsPlaying(false), children: (0, jsx_runtime_1.jsx)("source", { src: `${url}` }) }), play === 'on-click' && !isClickedOnCover && ((0, jsx_runtime_1.jsx)("div", { className: `video-background-${sectionId}-cover-container`, style: {
75
75
  position: 'absolute',
76
76
  left: 0,
77
77
  width: '100%',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk-nextjs",
3
- "version": "1.8.24",
3
+ "version": "1.8.26",
4
4
  "description": "SDK for Next.js",
5
5
  "author": "arsen@momdesign.nyc",
6
6
  "license": "MIT",
@@ -89,7 +89,7 @@ export const SectionVideo: FC<Props> = ({ container, sectionId, media }) => {
89
89
  autoPlay={play === 'auto'}
90
90
  loop
91
91
  style={{
92
- opacity: !isPlaying && play === 'on-click' && coverUrl ? 0 : 1,
92
+ opacity: !isClickedOnCover && play === 'on-click' && coverUrl ? 0 : 1,
93
93
  objectFit: isContainHeight ? 'cover' : (size ?? 'cover') as CSSProperties['objectFit'],
94
94
  width: isContainHeight && !isVideoWidthOverflow ? 'auto' : '100%',
95
95
  transform: isContainHeight ? 'translateX(-50%)' : 'none',
@@ -107,7 +107,7 @@ export const SectionVideo: FC<Props> = ({ container, sectionId, media }) => {
107
107
  >
108
108
  <source src={`${url}`} />
109
109
  </video>
110
- {play === 'on-click' && !isPlaying && (
110
+ {play === 'on-click' && !isClickedOnCover && (
111
111
  <div
112
112
  className={`video-background-${sectionId}-cover-container`}
113
113
  style={{