pb-sxp-ui 1.0.30 → 1.0.31
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 +17 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -14
- 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 +20 -18
- 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 +17 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +17 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
@@ -10,6 +10,7 @@ var qs = require('qs');
|
|
10
10
|
var css = require('@emotion/css');
|
11
11
|
var proComponents = require('@ant-design/pro-components');
|
12
12
|
var ReactDOM = require('react-dom');
|
13
|
+
var Hls = require('hls.js');
|
13
14
|
var EventEmitter = require('eventemitter3');
|
14
15
|
|
15
16
|
function _interopNamespaceDefault(e) {
|
@@ -12126,20 +12127,22 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
12126
12127
|
setIsPauseVideo(false);
|
12127
12128
|
if (!videoRef.current.src) {
|
12128
12129
|
const videoSrc = rec.video.url;
|
12129
|
-
|
12130
|
-
|
12131
|
-
|
12132
|
-
|
12133
|
-
|
12134
|
-
|
12135
|
-
|
12136
|
-
|
12137
|
-
|
12138
|
-
|
12139
|
-
|
12140
|
-
|
12141
|
-
|
12142
|
-
|
12130
|
+
if (videoSrc.includes('.m3u8')) {
|
12131
|
+
if (Hls.isSupported()) {
|
12132
|
+
const hls = new Hls();
|
12133
|
+
hls.loadSource(videoSrc);
|
12134
|
+
hls.attachMedia(videoRef.current);
|
12135
|
+
}
|
12136
|
+
else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
|
12137
|
+
videoRef.current.src = videoSrc;
|
12138
|
+
}
|
12139
|
+
else {
|
12140
|
+
videoRef.current.src = videoSrc;
|
12141
|
+
}
|
12142
|
+
}
|
12143
|
+
else {
|
12144
|
+
videoRef.current.src = videoSrc;
|
12145
|
+
}
|
12143
12146
|
videoRef.current.setAttribute('x5-playsinline', 'true');
|
12144
12147
|
videoRef.current.setAttribute('webkit-playsinline', 'true');
|
12145
12148
|
}
|