stormcloud-video-player 0.1.12 → 0.1.13
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/stormcloud-vp.min.js +2 -11
- package/lib/index.cjs +7 -26
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +7 -26
- package/lib/index.js.map +1 -1
- package/package.json +2 -1
package/lib/index.js
CHANGED
|
@@ -1822,7 +1822,7 @@ var StormcloudVideoPlayerComponent = React.memo(
|
|
|
1822
1822
|
});
|
|
1823
1823
|
}
|
|
1824
1824
|
};
|
|
1825
|
-
const interval = setInterval(checkAdStatus,
|
|
1825
|
+
const interval = setInterval(checkAdStatus, 100);
|
|
1826
1826
|
return () => clearInterval(interval);
|
|
1827
1827
|
}, []);
|
|
1828
1828
|
useEffect(() => {
|
|
@@ -1900,7 +1900,11 @@ var StormcloudVideoPlayerComponent = React.memo(
|
|
|
1900
1900
|
setShowCenterPlay(false);
|
|
1901
1901
|
};
|
|
1902
1902
|
const handlePause = () => {
|
|
1903
|
-
|
|
1903
|
+
if (playerRef.current && !playerRef.current.isShowingAds()) {
|
|
1904
|
+
setShowCenterPlay(true);
|
|
1905
|
+
} else {
|
|
1906
|
+
setShowCenterPlay(false);
|
|
1907
|
+
}
|
|
1904
1908
|
};
|
|
1905
1909
|
const handleEnded = () => {
|
|
1906
1910
|
setShowCenterPlay(true);
|
|
@@ -2065,7 +2069,7 @@ var StormcloudVideoPlayerComponent = React.memo(
|
|
|
2065
2069
|
)
|
|
2066
2070
|
}
|
|
2067
2071
|
),
|
|
2068
|
-
showCenterPlay && !isLoading && !isBuffering && /* @__PURE__ */ jsx(
|
|
2072
|
+
showCenterPlay && !isLoading && !isBuffering && !adStatus.showAds && /* @__PURE__ */ jsx(
|
|
2069
2073
|
"div",
|
|
2070
2074
|
{
|
|
2071
2075
|
onClick: handleCenterPlayClick,
|
|
@@ -2116,29 +2120,6 @@ var StormcloudVideoPlayerComponent = React.memo(
|
|
|
2116
2120
|
)
|
|
2117
2121
|
}
|
|
2118
2122
|
),
|
|
2119
|
-
adStatus.showAds && adStatus.totalAds > 0 && /* @__PURE__ */ jsxs(
|
|
2120
|
-
"div",
|
|
2121
|
-
{
|
|
2122
|
-
style: {
|
|
2123
|
-
position: "absolute",
|
|
2124
|
-
top: "10px",
|
|
2125
|
-
right: "10px",
|
|
2126
|
-
backgroundColor: "rgba(0, 0, 0, 0.7)",
|
|
2127
|
-
color: "white",
|
|
2128
|
-
padding: "4px 8px",
|
|
2129
|
-
borderRadius: "4px",
|
|
2130
|
-
fontSize: "12px",
|
|
2131
|
-
fontFamily: "Arial, sans-serif",
|
|
2132
|
-
zIndex: 10
|
|
2133
|
-
},
|
|
2134
|
-
children: [
|
|
2135
|
-
"Ad ",
|
|
2136
|
-
adStatus.currentIndex,
|
|
2137
|
-
"/",
|
|
2138
|
-
adStatus.totalAds
|
|
2139
|
-
]
|
|
2140
|
-
}
|
|
2141
|
-
),
|
|
2142
2123
|
shouldShowEnhancedControls ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
2143
2124
|
"div",
|
|
2144
2125
|
{
|