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/pb-ui.js CHANGED
@@ -12792,7 +12792,7 @@ Made in Italy` })));
12792
12792
  * @Author: binruan@chatlabs.com
12793
12793
  * @Date: 2024-01-15 19:03:09
12794
12794
  * @LastEditors: binruan@chatlabs.com
12795
- * @LastEditTime: 2024-05-20 10:04:39
12795
+ * @LastEditTime: 2024-05-20 19:26:50
12796
12796
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12797
12797
  *
12798
12798
  */
@@ -12852,23 +12852,29 @@ Made in Italy` })));
12852
12852
  };
12853
12853
  const firstRef = React.useRef();
12854
12854
  React.useEffect(() => {
12855
- if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
12855
+ var _a, _b, _c;
12856
+ if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
12856
12857
  firstRef.current = true;
12857
12858
  const player = TCPlayer('player-container-id', {
12858
12859
  licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12859
12860
  controls: false,
12860
- autoplay: false,
12861
12861
  loop: false,
12862
+ autoplay: true,
12862
12863
  muted: true,
12863
12864
  preload: 'auto',
12864
12865
  posterImage: false,
12865
- bigPlayButton: true
12866
+ bigPlayButton: true,
12867
+ sources: [
12868
+ {
12869
+ 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 : ''
12870
+ }
12871
+ ]
12866
12872
  });
12867
12873
  player === null || player === void 0 ? void 0 : player.ready(() => {
12868
12874
  setVideoRef(player);
12869
12875
  });
12870
12876
  }
12871
- }, [videoRef, licenseUrl]);
12877
+ }, [videoRef, licenseUrl, data]);
12872
12878
  React.useEffect(() => {
12873
12879
  if (!isInit)
12874
12880
  handleH5EnterLink();