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.
@@ -76,7 +76,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
76
76
  };
77
77
  const firstRef = useRef();
78
78
  useEffect(() => {
79
- var _a, _b, _c;
79
+ var _a, _b, _c, _d;
80
80
  if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
81
81
  firstRef.current = true;
82
82
  const player = TCPlayer('player-container-id', {
@@ -88,11 +88,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
88
88
  preload: 'auto',
89
89
  posterImage: false,
90
90
  bigPlayButton: true,
91
- sources: [
92
- {
93
- 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 : ''
94
- }
95
- ]
91
+ 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)
92
+ ? [
93
+ {
94
+ 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
95
+ }
96
+ ]
97
+ : []
96
98
  });
97
99
  player === null || player === void 0 ? void 0 : player.ready(() => {
98
100
  setVideoRef(player);
@@ -79,7 +79,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
79
79
  };
80
80
  const firstRef = (0, react_1.useRef)();
81
81
  (0, react_1.useEffect)(() => {
82
- var _a, _b, _c;
82
+ var _a, _b, _c, _d;
83
83
  if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
84
84
  firstRef.current = true;
85
85
  const player = TCPlayer('player-container-id', {
@@ -91,11 +91,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
91
91
  preload: 'auto',
92
92
  posterImage: false,
93
93
  bigPlayButton: true,
94
- sources: [
95
- {
96
- 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 : ''
97
- }
98
- ]
94
+ 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)
95
+ ? [
96
+ {
97
+ 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
98
+ }
99
+ ]
100
+ : []
99
101
  });
100
102
  player === null || player === void 0 ? void 0 : player.ready(() => {
101
103
  setVideoRef(player);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.76",
3
+ "version": "1.0.78",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",