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/pb-ui.js
CHANGED
@@ -12106,6 +12106,7 @@ Made in Italy` })));
|
|
12106
12106
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
12107
12107
|
if (!videoRef)
|
12108
12108
|
return;
|
12109
|
+
setIsLoadFinish(true);
|
12109
12110
|
setIsPauseVideo(false);
|
12110
12111
|
const item = data[index];
|
12111
12112
|
if (item && (videoRef === null || videoRef === void 0 ? void 0 : videoRef.duration())) {
|
@@ -12133,13 +12134,15 @@ Made in Italy` })));
|
|
12133
12134
|
}, [bffEventReport, data, index, isFirstPlay, videoRef]);
|
12134
12135
|
const handLoadeddata = React.useCallback(() => {
|
12135
12136
|
var _a;
|
12136
|
-
if (!videoRef ||
|
12137
|
+
if (!videoRef || firstFrameSrc || !blur)
|
12137
12138
|
return;
|
12138
12139
|
const videoDomRef = document.getElementById('player-container-id_html5_api');
|
12139
|
-
if (
|
12140
|
+
if (!videoDomRef)
|
12141
|
+
return;
|
12142
|
+
videoDomRef.style.objectFit = 'contain';
|
12143
|
+
if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !canvasRef.current || isBgColor)
|
12140
12144
|
return;
|
12141
12145
|
const setFrameImg = () => {
|
12142
|
-
videoDomRef.style.objectFit = 'contain';
|
12143
12146
|
const video = videoDomRef;
|
12144
12147
|
const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
|
12145
12148
|
const ctx = canvas.getContext('2d');
|
@@ -12163,9 +12166,9 @@ Made in Italy` })));
|
|
12163
12166
|
// videoRef?.play();
|
12164
12167
|
// videoRef?.pause();
|
12165
12168
|
// }
|
12166
|
-
setIsLoadFinish(true);
|
12169
|
+
// setIsLoadFinish(true);
|
12167
12170
|
}, [videoRef, handLoadeddata]);
|
12168
|
-
|
12171
|
+
React.useCallback(() => {
|
12169
12172
|
setIsLoadFinish(true);
|
12170
12173
|
}, []);
|
12171
12174
|
const handleClickVideo = React.useCallback((type) => () => {
|
@@ -12239,11 +12242,10 @@ Made in Italy` })));
|
|
12239
12242
|
if (!dom && !dom2)
|
12240
12243
|
return;
|
12241
12244
|
videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
|
12242
|
-
videoRef.poster('https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240218/fsTan2fgYKJWrCpJtGZPogm0NnvdT1708239153661.jpeg');
|
12243
12245
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
|
12244
12246
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
|
12245
12247
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
|
12246
|
-
|
12248
|
+
// videoRef?.on('canplay', handleCanplay);
|
12247
12249
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('playing', handlePlaying);
|
12248
12250
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('pause', handlePause);
|
12249
12251
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('ended', handleEnded);
|
@@ -12251,7 +12253,7 @@ Made in Italy` })));
|
|
12251
12253
|
dom2 === null || dom2 === void 0 ? void 0 : dom2.appendChild(dom);
|
12252
12254
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('loadedmetadata', handleLoadedmetadata);
|
12253
12255
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('loadeddata', handLoadeddata);
|
12254
|
-
|
12256
|
+
// videoRef?.off('canplay', handleCanplay);
|
12255
12257
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('playing', handlePlaying);
|
12256
12258
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('pause', handlePause);
|
12257
12259
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.off('ended', handleEnded);
|
@@ -12651,7 +12653,7 @@ Made in Italy` })));
|
|
12651
12653
|
* @Author: binruan@chatlabs.com
|
12652
12654
|
* @Date: 2024-01-15 19:03:09
|
12653
12655
|
* @LastEditors: binruan@chatlabs.com
|
12654
|
-
* @LastEditTime: 2024-04-30
|
12656
|
+
* @LastEditTime: 2024-04-30 16:16:05
|
12655
12657
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12656
12658
|
*
|
12657
12659
|
*/
|
@@ -12825,9 +12827,9 @@ Made in Italy` })));
|
|
12825
12827
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
12826
12828
|
minusHeight += 45;
|
12827
12829
|
}
|
12828
|
-
if (tagList.length > 0) {
|
12829
|
-
|
12830
|
-
}
|
12830
|
+
// if (tagList.length > 0) {
|
12831
|
+
// minusHeight += 45;
|
12832
|
+
// }
|
12831
12833
|
return containerHeight - minusHeight;
|
12832
12834
|
}, [globalConfig, containerHeight, tagList]);
|
12833
12835
|
const renderLogo = React.useMemo(() => {
|