pb-sxp-ui 1.0.76 → 1.0.78

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/pb-ui.js CHANGED
@@ -12959,7 +12959,7 @@ Made in Italy` })));
12959
12959
  * @Author: binruan@chatlabs.com
12960
12960
  * @Date: 2024-01-15 19:03:09
12961
12961
  * @LastEditors: binruan@chatlabs.com
12962
- * @LastEditTime: 2024-05-30 11:35:35
12962
+ * @LastEditTime: 2024-06-06 18:42:24
12963
12963
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12964
12964
  *
12965
12965
  */
@@ -13019,7 +13019,7 @@ Made in Italy` })));
13019
13019
  };
13020
13020
  const firstRef = React.useRef();
13021
13021
  React.useEffect(() => {
13022
- var _a, _b, _c;
13022
+ var _a, _b, _c, _d;
13023
13023
  if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
13024
13024
  firstRef.current = true;
13025
13025
  const player = TCPlayer('player-container-id', {
@@ -13031,11 +13031,13 @@ Made in Italy` })));
13031
13031
  preload: 'auto',
13032
13032
  posterImage: false,
13033
13033
  bigPlayButton: true,
13034
- sources: [
13035
- {
13036
- 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 : ''
13037
- }
13038
- ]
13034
+ sources: ((_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)
13035
+ ? [
13036
+ {
13037
+ src: (_d = (_c = data === null || data === void 0 ? void 0 : data[0]) === null || _c === void 0 ? void 0 : _c.video) === null || _d === void 0 ? void 0 : _d.url
13038
+ }
13039
+ ]
13040
+ : []
13039
13041
  });
13040
13042
  player === null || player === void 0 ? void 0 : player.ready(() => {
13041
13043
  setVideoRef(player);