pb-sxp-ui 1.6.5 → 1.6.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/index.cjs +21 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -18
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +21 -18
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/ExpandableText.js +3 -1
- package/es/core/components/SxpPageRender/VideoWidget/index.js +17 -16
- package/lib/core/components/SxpPageRender/ExpandableText.js +3 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +17 -16
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -9075,7 +9075,7 @@
|
|
9075
9075
|
* @Author: binruan@chatlabs.com
|
9076
9076
|
* @Date: 2023-12-26 16:11:34
|
9077
9077
|
* @LastEditors: binruan@chatlabs.com
|
9078
|
-
* @LastEditTime: 2024-
|
9078
|
+
* @LastEditTime: 2024-10-18 14:52:42
|
9079
9079
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
|
9080
9080
|
*
|
9081
9081
|
*/
|
@@ -9112,6 +9112,8 @@
|
|
9112
9112
|
}, [text, maxStr, isShowMore]);
|
9113
9113
|
React.useEffect(() => {
|
9114
9114
|
var _a, _b;
|
9115
|
+
if (multiRowCopy === null || multiRowCopy === void 0 ? void 0 : multiRowCopy.current)
|
9116
|
+
multiRowCopy.current.style.display = 'block';
|
9115
9117
|
if (((_a = multiRowCopy === null || multiRowCopy === void 0 ? void 0 : multiRowCopy.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) > ((_b = multiRow === null || multiRow === void 0 ? void 0 : multiRow.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) && isPost) {
|
9116
9118
|
setIsShow(true);
|
9117
9119
|
}
|
@@ -9119,7 +9121,7 @@
|
|
9119
9121
|
setIsShow(false);
|
9120
9122
|
}
|
9121
9123
|
multiRowCopy.current.style.display = 'none';
|
9122
|
-
}, [isPost]);
|
9124
|
+
}, [isPost, text]);
|
9123
9125
|
return (React.createElement("div", { className: className, style: Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' }), hidden: !text || text === '' },
|
9124
9126
|
React.createElement("div", { ref: multiRow, style: {
|
9125
9127
|
overflow: 'hidden',
|
@@ -15572,6 +15574,7 @@ Made in Italy` })));
|
|
15572
15574
|
const videoRef = React.useRef();
|
15573
15575
|
const videoId = `pb-cache-video-${index}`;
|
15574
15576
|
const videoEleRef = React.useRef(null);
|
15577
|
+
const hlsRef = React.useRef(null);
|
15575
15578
|
const blur = React.useMemo(() => {
|
15576
15579
|
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
|
15577
15580
|
}, [videoPostConfig]);
|
@@ -15750,12 +15753,12 @@ Made in Italy` })));
|
|
15750
15753
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
15751
15754
|
return;
|
15752
15755
|
const Hls = window === null || window === void 0 ? void 0 : window.Hls;
|
15753
|
-
let hls = null;
|
15756
|
+
let hls = hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current;
|
15754
15757
|
if (videoSrc.includes('.m3u8') && Hls && Hls.isSupported()) {
|
15755
15758
|
hls = new Hls();
|
15756
|
-
hls.loadSource(videoSrc);
|
15757
|
-
hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
15758
|
-
hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
15759
|
+
hls === null || hls === void 0 ? void 0 : hls.loadSource(videoSrc);
|
15760
|
+
hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
15761
|
+
hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
15759
15762
|
var _a;
|
15760
15763
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
15761
15764
|
});
|
@@ -15774,23 +15777,23 @@ Made in Italy` })));
|
|
15774
15777
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
15775
15778
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
15776
15779
|
return () => {
|
15777
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
15780
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
15778
15781
|
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
15779
15782
|
if (!isPause)
|
15780
15783
|
handlePause();
|
15781
|
-
if (
|
15782
|
-
|
15784
|
+
if (hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current)
|
15785
|
+
(_b = hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current) === null || _b === void 0 ? void 0 : _b.destroy();
|
15783
15786
|
setIsLoadFinish(false);
|
15784
|
-
(
|
15785
|
-
(
|
15786
|
-
(
|
15787
|
-
(
|
15788
|
-
(
|
15789
|
-
(
|
15790
|
-
(
|
15791
|
-
(
|
15787
|
+
(_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadedmetadata', handleLoadedmetadata);
|
15788
|
+
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
|
15789
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
|
15790
|
+
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
|
15791
|
+
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
|
15792
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
|
15793
|
+
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
|
15794
|
+
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
|
15792
15795
|
};
|
15793
|
-
}, [isActive
|
15796
|
+
}, [isActive]);
|
15794
15797
|
React.useEffect(() => {
|
15795
15798
|
var _a, _b;
|
15796
15799
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
|