pb-sxp-ui 1.6.5 → 1.6.7
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.css +1 -0
- 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/index.css
CHANGED
package/dist/index.js
CHANGED
@@ -9060,7 +9060,7 @@ var Modal$1 = memo(Modal);
|
|
9060
9060
|
* @Author: binruan@chatlabs.com
|
9061
9061
|
* @Date: 2023-12-26 16:11:34
|
9062
9062
|
* @LastEditors: binruan@chatlabs.com
|
9063
|
-
* @LastEditTime: 2024-
|
9063
|
+
* @LastEditTime: 2024-10-18 14:52:42
|
9064
9064
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
|
9065
9065
|
*
|
9066
9066
|
*/
|
@@ -9097,6 +9097,8 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
9097
9097
|
}, [text, maxStr, isShowMore]);
|
9098
9098
|
useEffect(() => {
|
9099
9099
|
var _a, _b;
|
9100
|
+
if (multiRowCopy === null || multiRowCopy === void 0 ? void 0 : multiRowCopy.current)
|
9101
|
+
multiRowCopy.current.style.display = 'block';
|
9100
9102
|
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) {
|
9101
9103
|
setIsShow(true);
|
9102
9104
|
}
|
@@ -9104,7 +9106,7 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
9104
9106
|
setIsShow(false);
|
9105
9107
|
}
|
9106
9108
|
multiRowCopy.current.style.display = 'none';
|
9107
|
-
}, [isPost]);
|
9109
|
+
}, [isPost, text]);
|
9108
9110
|
return (React.createElement("div", { className: className, style: Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' }), hidden: !text || text === '' },
|
9109
9111
|
React.createElement("div", { ref: multiRow, style: {
|
9110
9112
|
overflow: 'hidden',
|
@@ -15557,6 +15559,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
15557
15559
|
const videoRef = useRef();
|
15558
15560
|
const videoId = `pb-cache-video-${index}`;
|
15559
15561
|
const videoEleRef = useRef(null);
|
15562
|
+
const hlsRef = useRef(null);
|
15560
15563
|
const blur = useMemo(() => {
|
15561
15564
|
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
|
15562
15565
|
}, [videoPostConfig]);
|
@@ -15735,12 +15738,12 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
15735
15738
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
15736
15739
|
return;
|
15737
15740
|
const Hls = window === null || window === void 0 ? void 0 : window.Hls;
|
15738
|
-
let hls = null;
|
15741
|
+
let hls = hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current;
|
15739
15742
|
if (videoSrc.includes('.m3u8') && Hls && Hls.isSupported()) {
|
15740
15743
|
hls = new Hls();
|
15741
|
-
hls.loadSource(videoSrc);
|
15742
|
-
hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
15743
|
-
hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
15744
|
+
hls === null || hls === void 0 ? void 0 : hls.loadSource(videoSrc);
|
15745
|
+
hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
15746
|
+
hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
15744
15747
|
var _a;
|
15745
15748
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
15746
15749
|
});
|
@@ -15759,23 +15762,23 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
15759
15762
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
15760
15763
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
15761
15764
|
return () => {
|
15762
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
15765
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
15763
15766
|
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
15764
15767
|
if (!isPause)
|
15765
15768
|
handlePause();
|
15766
|
-
if (
|
15767
|
-
|
15769
|
+
if (hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current)
|
15770
|
+
(_b = hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current) === null || _b === void 0 ? void 0 : _b.destroy();
|
15768
15771
|
setIsLoadFinish(false);
|
15769
|
-
(
|
15770
|
-
(
|
15771
|
-
(
|
15772
|
-
(
|
15773
|
-
(
|
15774
|
-
(
|
15775
|
-
(
|
15776
|
-
(
|
15772
|
+
(_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadedmetadata', handleLoadedmetadata);
|
15773
|
+
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
|
15774
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
|
15775
|
+
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
|
15776
|
+
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
|
15777
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
|
15778
|
+
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
|
15779
|
+
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
|
15777
15780
|
};
|
15778
|
-
}, [isActive
|
15781
|
+
}, [isActive]);
|
15779
15782
|
useEffect(() => {
|
15780
15783
|
var _a, _b;
|
15781
15784
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
|