pb-sxp-ui 1.0.49 → 1.0.51
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 +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -12
- 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 +14 -12
- 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/VideoWidget/index.js +6 -7
- package/es/core/components/SxpPageRender/index.js +0 -3
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +6 -7
- package/lib/core/components/SxpPageRender/index.js +0 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -12092,6 +12092,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12092
12092
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
12093
12093
|
if (!videoRef)
|
12094
12094
|
return;
|
12095
|
+
setIsLoadFinish(true);
|
12095
12096
|
setIsPauseVideo(false);
|
12096
12097
|
const item = data[index];
|
12097
12098
|
if (item && (videoRef === null || videoRef === void 0 ? void 0 : videoRef.duration())) {
|
@@ -12119,13 +12120,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12119
12120
|
}, [bffEventReport, data, index, isFirstPlay, videoRef]);
|
12120
12121
|
const handLoadeddata = useCallback(() => {
|
12121
12122
|
var _a;
|
12122
|
-
if (!videoRef ||
|
12123
|
+
if (!videoRef || firstFrameSrc || !blur)
|
12123
12124
|
return;
|
12124
12125
|
const videoDomRef = document.getElementById('player-container-id_html5_api');
|
12125
|
-
if (
|
12126
|
+
if (!videoDomRef)
|
12127
|
+
return;
|
12128
|
+
videoDomRef.style.objectFit = 'contain';
|
12129
|
+
if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !canvasRef.current || isBgColor)
|
12126
12130
|
return;
|
12127
12131
|
const setFrameImg = () => {
|
12128
|
-
videoDomRef.style.objectFit = 'contain';
|
12129
12132
|
const video = videoDomRef;
|
12130
12133
|
const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
|
12131
12134
|
const ctx = canvas.getContext('2d');
|
@@ -12149,9 +12152,9 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12149
12152
|
// videoRef?.play();
|
12150
12153
|
// videoRef?.pause();
|
12151
12154
|
// }
|
12152
|
-
setIsLoadFinish(true);
|
12155
|
+
// setIsLoadFinish(true);
|
12153
12156
|
}, [videoRef, handLoadeddata]);
|
12154
|
-
|
12157
|
+
useCallback(() => {
|
12155
12158
|
setIsLoadFinish(true);
|
12156
12159
|
}, []);
|
12157
12160
|
const handleClickVideo = useCallback((type) => () => {
|
@@ -12225,11 +12228,10 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12225
12228
|
if (!dom && !dom2)
|
12226
12229
|
return;
|
12227
12230
|
videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
|
12228
|
-
videoRef.poster('https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240218/fsTan2fgYKJWrCpJtGZPogm0NnvdT1708239153661.jpeg');
|
12229
12231
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
|
12230
12232
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
|
12231
12233
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
|
12232
|
-
|
12234
|
+
// videoRef?.on('canplay', handleCanplay);
|
12233
12235
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('playing', handlePlaying);
|
12234
12236
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('pause', handlePause);
|
12235
12237
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('ended', handleEnded);
|
@@ -12237,7 +12239,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12237
12239
|
dom2 === null || dom2 === void 0 ? void 0 : dom2.appendChild(dom);
|
12238
12240
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('loadedmetadata', handleLoadedmetadata);
|
12239
12241
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('loadeddata', handLoadeddata);
|
12240
|
-
|
12242
|
+
// videoRef?.off('canplay', handleCanplay);
|
12241
12243
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('playing', handlePlaying);
|
12242
12244
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('pause', handlePause);
|
12243
12245
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('ended', handleEnded);
|
@@ -12637,7 +12639,7 @@ const Nudge = ({ nudge }) => {
|
|
12637
12639
|
* @Author: binruan@chatlabs.com
|
12638
12640
|
* @Date: 2024-01-15 19:03:09
|
12639
12641
|
* @LastEditors: binruan@chatlabs.com
|
12640
|
-
* @LastEditTime: 2024-04-30
|
12642
|
+
* @LastEditTime: 2024-04-30 16:16:05
|
12641
12643
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12642
12644
|
*
|
12643
12645
|
*/
|
@@ -12811,9 +12813,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
12811
12813
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
12812
12814
|
minusHeight += 45;
|
12813
12815
|
}
|
12814
|
-
if (tagList.length > 0) {
|
12815
|
-
|
12816
|
-
}
|
12816
|
+
// if (tagList.length > 0) {
|
12817
|
+
// minusHeight += 45;
|
12818
|
+
// }
|
12817
12819
|
return containerHeight - minusHeight;
|
12818
12820
|
}, [globalConfig, containerHeight, tagList]);
|
12819
12821
|
const renderLogo = useMemo(() => {
|