pb-sxp-ui 1.0.89 → 1.0.91
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 +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +7 -6
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/VideoWidget/index.js +3 -3
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +4 -4
- package/package.json +1 -2
@@ -4,7 +4,6 @@ import { useIconLink } from '../useIconLink';
|
|
4
4
|
import FormatImage from '../FormatImage';
|
5
5
|
import { useSxpDataSource } from '../../../../core/hooks';
|
6
6
|
import SXP_EVENT_BUS, { SXP_EVENT_TYPE } from '../../../../core/utils/event';
|
7
|
-
import Hls from 'hls.js';
|
8
7
|
const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoRef }) => {
|
9
8
|
const [isPauseVideo, setIsPauseVideo] = useState(false);
|
10
9
|
const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport } = useSxpDataSource();
|
@@ -175,11 +174,12 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
175
174
|
const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
|
176
175
|
if (!videoSrc)
|
177
176
|
return;
|
177
|
+
const Hls = window === null || window === void 0 ? void 0 : window.Hls;
|
178
178
|
if (videoSrc.includes('.m3u8')) {
|
179
|
-
if (Hls.isSupported()) {
|
179
|
+
if (Hls && Hls.isSupported()) {
|
180
180
|
const hls = new Hls();
|
181
181
|
hls.loadSource(videoSrc);
|
182
|
-
hls.attachMedia(videoRef
|
182
|
+
hls.attachMedia(videoRef);
|
183
183
|
}
|
184
184
|
else {
|
185
185
|
videoRef.src = videoSrc;
|
@@ -7,7 +7,6 @@ const useIconLink_1 = require("../useIconLink");
|
|
7
7
|
const FormatImage_1 = tslib_1.__importDefault(require("../FormatImage"));
|
8
8
|
const hooks_1 = require("../../../../core/hooks");
|
9
9
|
const event_1 = tslib_1.__importStar(require("../../../../core/utils/event"));
|
10
|
-
const hls_js_1 = tslib_1.__importDefault(require("hls.js"));
|
11
10
|
const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoRef }) => {
|
12
11
|
const [isPauseVideo, setIsPauseVideo] = (0, react_1.useState)(false);
|
13
12
|
const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport } = (0, hooks_1.useSxpDataSource)();
|
@@ -178,11 +177,12 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
178
177
|
const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
|
179
178
|
if (!videoSrc)
|
180
179
|
return;
|
180
|
+
const Hls = window === null || window === void 0 ? void 0 : window.Hls;
|
181
181
|
if (videoSrc.includes('.m3u8')) {
|
182
|
-
if (
|
183
|
-
const hls = new
|
182
|
+
if (Hls && Hls.isSupported()) {
|
183
|
+
const hls = new Hls();
|
184
184
|
hls.loadSource(videoSrc);
|
185
|
-
hls.attachMedia(videoRef
|
185
|
+
hls.attachMedia(videoRef);
|
186
186
|
}
|
187
187
|
else {
|
188
188
|
videoRef.src = videoSrc;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "pb-sxp-ui",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.91",
|
4
4
|
"description": "React enterprise-class UI components",
|
5
5
|
"main": "dist/index.cjs",
|
6
6
|
"module": "dist/index.js",
|
@@ -39,7 +39,6 @@
|
|
39
39
|
"@emotion/css": "^11.11.2",
|
40
40
|
"eslint": "^8.48.0",
|
41
41
|
"eventemitter3": "^5.0.1",
|
42
|
-
"hls.js": "^1.5.11",
|
43
42
|
"less": "^4.2.0",
|
44
43
|
"lodash": "^4.17.21",
|
45
44
|
"pako": "^2.1.0",
|