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.js CHANGED
@@ -12777,7 +12777,7 @@ var Tagbar$1 = memo(Tagbar);
12777
12777
  * @Author: binruan@chatlabs.com
12778
12778
  * @Date: 2024-01-15 19:03:09
12779
12779
  * @LastEditors: binruan@chatlabs.com
12780
- * @LastEditTime: 2024-05-20 10:04:39
12780
+ * @LastEditTime: 2024-05-20 19:26:50
12781
12781
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12782
12782
  *
12783
12783
  */
@@ -12837,23 +12837,29 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12837
12837
  };
12838
12838
  const firstRef = useRef();
12839
12839
  useEffect(() => {
12840
- if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
12840
+ var _a, _b, _c;
12841
+ if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
12841
12842
  firstRef.current = true;
12842
12843
  const player = TCPlayer('player-container-id', {
12843
12844
  licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12844
12845
  controls: false,
12845
- autoplay: false,
12846
12846
  loop: false,
12847
+ autoplay: true,
12847
12848
  muted: true,
12848
12849
  preload: 'auto',
12849
12850
  posterImage: false,
12850
- bigPlayButton: true
12851
+ bigPlayButton: true,
12852
+ sources: [
12853
+ {
12854
+ 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 : ''
12855
+ }
12856
+ ]
12851
12857
  });
12852
12858
  player === null || player === void 0 ? void 0 : player.ready(() => {
12853
12859
  setVideoRef(player);
12854
12860
  });
12855
12861
  }
12856
- }, [videoRef, licenseUrl]);
12862
+ }, [videoRef, licenseUrl, data]);
12857
12863
  useEffect(() => {
12858
12864
  if (!isInit)
12859
12865
  handleH5EnterLink();