@swipefindercom/finder-sdk 1.0.5 → 1.0.6
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.
- package/dist/finder-sdk-react.cjs.js +1 -1
- package/dist/finder-sdk-react.esm.js +12 -4
- package/dist/finder-sdk.esm.js +12 -4
- package/dist/finder-sdk.umd.js +1 -1
- package/dist/types/components/CardWrapper/VideoWrapper/VideoWrapper.d.ts.map +1 -1
- package/dist/types/components/SwipeableFeed/SwipeableFeed.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -41968,7 +41968,11 @@ const VideoWrapper = ({
|
|
|
41968
41968
|
}, [isActive, ready]);
|
|
41969
41969
|
useEffect(() => {
|
|
41970
41970
|
if (videoRef.current && ready) {
|
|
41971
|
-
|
|
41971
|
+
if (isMuted) {
|
|
41972
|
+
videoRef.current.muted = true;
|
|
41973
|
+
} else if (!videoRef.current.paused) {
|
|
41974
|
+
videoRef.current.muted = false;
|
|
41975
|
+
}
|
|
41972
41976
|
if (videoRef.current.volume !== void 0) {
|
|
41973
41977
|
videoRef.current.volume = volume;
|
|
41974
41978
|
}
|
|
@@ -41982,8 +41986,7 @@ const VideoWrapper = ({
|
|
|
41982
41986
|
videoElement.poster = card2.videoThumbnail;
|
|
41983
41987
|
videoElement.setAttribute("poster", card2.videoThumbnail);
|
|
41984
41988
|
}
|
|
41985
|
-
|
|
41986
|
-
}, [card2.videoUrl, card2.videoThumbnail, isMuted]);
|
|
41989
|
+
}, [card2.videoUrl, card2.videoThumbnail]);
|
|
41987
41990
|
const preload = cardIndex === 0 ? "auto" : "none";
|
|
41988
41991
|
return /* @__PURE__ */ jsx(Fragment$2, { children: card2.videoUrl && ready && /* @__PURE__ */ jsx("div", { className: styles$m.videoContainer, children: /* @__PURE__ */ jsx(
|
|
41989
41992
|
"hls-video",
|
|
@@ -41992,7 +41995,7 @@ const VideoWrapper = ({
|
|
|
41992
41995
|
id: `video-card-${card2.id}`,
|
|
41993
41996
|
class: styles$m.cardVideo,
|
|
41994
41997
|
src: card2.videoUrl,
|
|
41995
|
-
muted:
|
|
41998
|
+
muted: true,
|
|
41996
41999
|
loop: true,
|
|
41997
42000
|
playsInline: true,
|
|
41998
42001
|
preload,
|
|
@@ -43400,6 +43403,10 @@ const SwipeableFeed = ({
|
|
|
43400
43403
|
if (!isVideo) return;
|
|
43401
43404
|
const video = videoElement;
|
|
43402
43405
|
try {
|
|
43406
|
+
video.muted = true;
|
|
43407
|
+
if (video.setAttribute) {
|
|
43408
|
+
video.setAttribute("muted", "");
|
|
43409
|
+
}
|
|
43403
43410
|
if (video.readyState === void 0 || video.readyState < 2) {
|
|
43404
43411
|
await new Promise((resolve) => {
|
|
43405
43412
|
const onLoadedData = () => {
|
|
@@ -43420,6 +43427,7 @@ const SwipeableFeed = ({
|
|
|
43420
43427
|
const maxRetries = 5;
|
|
43421
43428
|
const attemptPlay = async () => {
|
|
43422
43429
|
try {
|
|
43430
|
+
video.muted = true;
|
|
43423
43431
|
if (video.play) {
|
|
43424
43432
|
await video.play();
|
|
43425
43433
|
}
|
package/dist/finder-sdk.esm.js
CHANGED
|
@@ -48934,7 +48934,11 @@ const VideoWrapper = ({
|
|
|
48934
48934
|
}, [isActive, ready]);
|
|
48935
48935
|
reactExports.useEffect(() => {
|
|
48936
48936
|
if (videoRef.current && ready) {
|
|
48937
|
-
|
|
48937
|
+
if (isMuted) {
|
|
48938
|
+
videoRef.current.muted = true;
|
|
48939
|
+
} else if (!videoRef.current.paused) {
|
|
48940
|
+
videoRef.current.muted = false;
|
|
48941
|
+
}
|
|
48938
48942
|
if (videoRef.current.volume !== void 0) {
|
|
48939
48943
|
videoRef.current.volume = volume;
|
|
48940
48944
|
}
|
|
@@ -48948,8 +48952,7 @@ const VideoWrapper = ({
|
|
|
48948
48952
|
videoElement.poster = card2.videoThumbnail;
|
|
48949
48953
|
videoElement.setAttribute("poster", card2.videoThumbnail);
|
|
48950
48954
|
}
|
|
48951
|
-
|
|
48952
|
-
}, [card2.videoUrl, card2.videoThumbnail, isMuted]);
|
|
48955
|
+
}, [card2.videoUrl, card2.videoThumbnail]);
|
|
48953
48956
|
const preload = cardIndex === 0 ? "auto" : "none";
|
|
48954
48957
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: card2.videoUrl && ready && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$m.videoContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48955
48958
|
"hls-video",
|
|
@@ -48958,7 +48961,7 @@ const VideoWrapper = ({
|
|
|
48958
48961
|
id: `video-card-${card2.id}`,
|
|
48959
48962
|
class: styles$m.cardVideo,
|
|
48960
48963
|
src: card2.videoUrl,
|
|
48961
|
-
muted:
|
|
48964
|
+
muted: true,
|
|
48962
48965
|
loop: true,
|
|
48963
48966
|
playsInline: true,
|
|
48964
48967
|
preload,
|
|
@@ -50366,6 +50369,10 @@ const SwipeableFeed = ({
|
|
|
50366
50369
|
if (!isVideo) return;
|
|
50367
50370
|
const video = videoElement;
|
|
50368
50371
|
try {
|
|
50372
|
+
video.muted = true;
|
|
50373
|
+
if (video.setAttribute) {
|
|
50374
|
+
video.setAttribute("muted", "");
|
|
50375
|
+
}
|
|
50369
50376
|
if (video.readyState === void 0 || video.readyState < 2) {
|
|
50370
50377
|
await new Promise((resolve) => {
|
|
50371
50378
|
const onLoadedData = () => {
|
|
@@ -50386,6 +50393,7 @@ const SwipeableFeed = ({
|
|
|
50386
50393
|
const maxRetries = 5;
|
|
50387
50394
|
const attemptPlay = async () => {
|
|
50388
50395
|
try {
|
|
50396
|
+
video.muted = true;
|
|
50389
50397
|
if (video.play) {
|
|
50390
50398
|
await video.play();
|
|
50391
50399
|
}
|