pb-sxp-ui 1.0.68 → 1.0.69
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 +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -5
- 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 +11 -5
- 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/index.js +10 -4
- package/lib/core/components/SxpPageRender/index.js +10 -4
- package/package.json +1 -1
@@ -76,23 +76,29 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
76
76
|
};
|
77
77
|
const firstRef = useRef();
|
78
78
|
useEffect(() => {
|
79
|
-
|
79
|
+
var _a, _b, _c;
|
80
|
+
if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
|
80
81
|
firstRef.current = true;
|
81
82
|
const player = TCPlayer('player-container-id', {
|
82
83
|
licenseUrl,
|
83
84
|
controls: false,
|
84
|
-
autoplay: false,
|
85
85
|
loop: false,
|
86
|
+
autoplay: true,
|
86
87
|
muted: true,
|
87
88
|
preload: 'auto',
|
88
89
|
posterImage: false,
|
89
|
-
bigPlayButton: true
|
90
|
+
bigPlayButton: true,
|
91
|
+
sources: [
|
92
|
+
{
|
93
|
+
src: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''
|
94
|
+
}
|
95
|
+
]
|
90
96
|
});
|
91
97
|
player === null || player === void 0 ? void 0 : player.ready(() => {
|
92
98
|
setVideoRef(player);
|
93
99
|
});
|
94
100
|
}
|
95
|
-
}, [videoRef, licenseUrl]);
|
101
|
+
}, [videoRef, licenseUrl, data]);
|
96
102
|
useEffect(() => {
|
97
103
|
if (!isInit)
|
98
104
|
handleH5EnterLink();
|
@@ -79,23 +79,29 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
79
79
|
};
|
80
80
|
const firstRef = (0, react_1.useRef)();
|
81
81
|
(0, react_1.useEffect)(() => {
|
82
|
-
|
82
|
+
var _a, _b, _c;
|
83
|
+
if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
|
83
84
|
firstRef.current = true;
|
84
85
|
const player = TCPlayer('player-container-id', {
|
85
86
|
licenseUrl,
|
86
87
|
controls: false,
|
87
|
-
autoplay: false,
|
88
88
|
loop: false,
|
89
|
+
autoplay: true,
|
89
90
|
muted: true,
|
90
91
|
preload: 'auto',
|
91
92
|
posterImage: false,
|
92
|
-
bigPlayButton: true
|
93
|
+
bigPlayButton: true,
|
94
|
+
sources: [
|
95
|
+
{
|
96
|
+
src: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''
|
97
|
+
}
|
98
|
+
]
|
93
99
|
});
|
94
100
|
player === null || player === void 0 ? void 0 : player.ready(() => {
|
95
101
|
setVideoRef(player);
|
96
102
|
});
|
97
103
|
}
|
98
|
-
}, [videoRef, licenseUrl]);
|
104
|
+
}, [videoRef, licenseUrl, data]);
|
99
105
|
(0, react_1.useEffect)(() => {
|
100
106
|
if (!isInit)
|
101
107
|
handleH5EnterLink();
|