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.cjs
CHANGED
@@ -12115,6 +12115,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12115
12115
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
12116
12116
|
if (!videoRef)
|
12117
12117
|
return;
|
12118
|
+
setIsLoadFinish(true);
|
12118
12119
|
setIsPauseVideo(false);
|
12119
12120
|
const item = data[index];
|
12120
12121
|
if (item && (videoRef === null || videoRef === void 0 ? void 0 : videoRef.duration())) {
|
@@ -12142,13 +12143,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12142
12143
|
}, [bffEventReport, data, index, isFirstPlay, videoRef]);
|
12143
12144
|
const handLoadeddata = React.useCallback(() => {
|
12144
12145
|
var _a;
|
12145
|
-
if (!videoRef ||
|
12146
|
+
if (!videoRef || firstFrameSrc || !blur)
|
12146
12147
|
return;
|
12147
12148
|
const videoDomRef = document.getElementById('player-container-id_html5_api');
|
12148
|
-
if (
|
12149
|
+
if (!videoDomRef)
|
12150
|
+
return;
|
12151
|
+
videoDomRef.style.objectFit = 'contain';
|
12152
|
+
if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !canvasRef.current || isBgColor)
|
12149
12153
|
return;
|
12150
12154
|
const setFrameImg = () => {
|
12151
|
-
videoDomRef.style.objectFit = 'contain';
|
12152
12155
|
const video = videoDomRef;
|
12153
12156
|
const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
|
12154
12157
|
const ctx = canvas.getContext('2d');
|
@@ -12172,9 +12175,9 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12172
12175
|
// videoRef?.play();
|
12173
12176
|
// videoRef?.pause();
|
12174
12177
|
// }
|
12175
|
-
setIsLoadFinish(true);
|
12178
|
+
// setIsLoadFinish(true);
|
12176
12179
|
}, [videoRef, handLoadeddata]);
|
12177
|
-
|
12180
|
+
React.useCallback(() => {
|
12178
12181
|
setIsLoadFinish(true);
|
12179
12182
|
}, []);
|
12180
12183
|
const handleClickVideo = React.useCallback((type) => () => {
|
@@ -12248,11 +12251,10 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12248
12251
|
if (!dom && !dom2)
|
12249
12252
|
return;
|
12250
12253
|
videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
|
12251
|
-
videoRef.poster('https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240218/fsTan2fgYKJWrCpJtGZPogm0NnvdT1708239153661.jpeg');
|
12252
12254
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
|
12253
12255
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
|
12254
12256
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
|
12255
|
-
|
12257
|
+
// videoRef?.on('canplay', handleCanplay);
|
12256
12258
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('playing', handlePlaying);
|
12257
12259
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('pause', handlePause);
|
12258
12260
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('ended', handleEnded);
|
@@ -12260,7 +12262,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12260
12262
|
dom2 === null || dom2 === void 0 ? void 0 : dom2.appendChild(dom);
|
12261
12263
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('loadedmetadata', handleLoadedmetadata);
|
12262
12264
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('loadeddata', handLoadeddata);
|
12263
|
-
|
12265
|
+
// videoRef?.off('canplay', handleCanplay);
|
12264
12266
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('playing', handlePlaying);
|
12265
12267
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('pause', handlePause);
|
12266
12268
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('ended', handleEnded);
|
@@ -12660,7 +12662,7 @@ const Nudge = ({ nudge }) => {
|
|
12660
12662
|
* @Author: binruan@chatlabs.com
|
12661
12663
|
* @Date: 2024-01-15 19:03:09
|
12662
12664
|
* @LastEditors: binruan@chatlabs.com
|
12663
|
-
* @LastEditTime: 2024-04-30
|
12665
|
+
* @LastEditTime: 2024-04-30 16:16:05
|
12664
12666
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12665
12667
|
*
|
12666
12668
|
*/
|
@@ -12834,9 +12836,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
12834
12836
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
12835
12837
|
minusHeight += 45;
|
12836
12838
|
}
|
12837
|
-
if (tagList.length > 0) {
|
12838
|
-
|
12839
|
-
}
|
12839
|
+
// if (tagList.length > 0) {
|
12840
|
+
// minusHeight += 45;
|
12841
|
+
// }
|
12840
12842
|
return containerHeight - minusHeight;
|
12841
12843
|
}, [globalConfig, containerHeight, tagList]);
|
12842
12844
|
const renderLogo = React.useMemo(() => {
|