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 CHANGED
@@ -12800,7 +12800,7 @@ var Tagbar$1 = React.memo(Tagbar);
12800
12800
  * @Author: binruan@chatlabs.com
12801
12801
  * @Date: 2024-01-15 19:03:09
12802
12802
  * @LastEditors: binruan@chatlabs.com
12803
- * @LastEditTime: 2024-05-20 10:04:39
12803
+ * @LastEditTime: 2024-05-20 19:26:50
12804
12804
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12805
12805
  *
12806
12806
  */
@@ -12860,23 +12860,29 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12860
12860
  };
12861
12861
  const firstRef = React.useRef();
12862
12862
  React.useEffect(() => {
12863
- if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
12863
+ var _a, _b, _c;
12864
+ if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
12864
12865
  firstRef.current = true;
12865
12866
  const player = TCPlayer('player-container-id', {
12866
12867
  licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12867
12868
  controls: false,
12868
- autoplay: false,
12869
12869
  loop: false,
12870
+ autoplay: true,
12870
12871
  muted: true,
12871
12872
  preload: 'auto',
12872
12873
  posterImage: false,
12873
- bigPlayButton: true
12874
+ bigPlayButton: true,
12875
+ sources: [
12876
+ {
12877
+ 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 : ''
12878
+ }
12879
+ ]
12874
12880
  });
12875
12881
  player === null || player === void 0 ? void 0 : player.ready(() => {
12876
12882
  setVideoRef(player);
12877
12883
  });
12878
12884
  }
12879
- }, [videoRef, licenseUrl]);
12885
+ }, [videoRef, licenseUrl, data]);
12880
12886
  React.useEffect(() => {
12881
12887
  if (!isInit)
12882
12888
  handleH5EnterLink();