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/index.cjs CHANGED
@@ -12967,7 +12967,7 @@ var Tagbar$1 = React.memo(Tagbar);
12967
12967
  * @Author: binruan@chatlabs.com
12968
12968
  * @Date: 2024-01-15 19:03:09
12969
12969
  * @LastEditors: binruan@chatlabs.com
12970
- * @LastEditTime: 2024-05-30 11:35:35
12970
+ * @LastEditTime: 2024-06-06 18:42:24
12971
12971
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12972
12972
  *
12973
12973
  */
@@ -13027,7 +13027,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13027
13027
  };
13028
13028
  const firstRef = React.useRef();
13029
13029
  React.useEffect(() => {
13030
- var _a, _b, _c;
13030
+ var _a, _b, _c, _d;
13031
13031
  if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
13032
13032
  firstRef.current = true;
13033
13033
  const player = TCPlayer('player-container-id', {
@@ -13039,11 +13039,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13039
13039
  preload: 'auto',
13040
13040
  posterImage: false,
13041
13041
  bigPlayButton: true,
13042
- sources: [
13043
- {
13044
- 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 : ''
13045
- }
13046
- ]
13042
+ 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)
13043
+ ? [
13044
+ {
13045
+ 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
13046
+ }
13047
+ ]
13048
+ : []
13047
13049
  });
13048
13050
  player === null || player === void 0 ? void 0 : player.ready(() => {
13049
13051
  setVideoRef(player);