pb-sxp-ui 1.0.36 → 1.0.37

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.
@@ -1,6 +1,5 @@
1
1
  import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
2
  import { useSwiperSlide } from 'swiper/react';
3
- import Hls from 'hls.js';
4
3
  import { useIconLink } from '../useIconLink';
5
4
  import FormatImage from '../FormatImage';
6
5
  import { useSxpDataSource } from '../../../../core/hooks';
@@ -141,26 +140,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
141
140
  setIsPauseVideo(false);
142
141
  if (!videoRef.current.src) {
143
142
  const videoSrc = rec.video.url;
144
- if (videoSrc.includes('.m3u8')) {
145
- if (Hls.isSupported()) {
146
- const hls = new Hls();
147
- hls.loadSource(videoSrc);
148
- hls.attachMedia(videoRef.current);
149
- hls.on(Hls.Events.MANIFEST_PARSED, function () {
150
- var _a;
151
- (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
152
- });
153
- }
154
- else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
155
- videoRef.current.src = videoSrc;
156
- }
157
- else {
158
- videoRef.current.src = videoSrc;
159
- }
160
- }
161
- else {
162
- videoRef.current.src = videoSrc;
163
- }
143
+ videoRef.current.src = videoSrc;
164
144
  videoRef.current.setAttribute('x5-playsinline', 'true');
165
145
  videoRef.current.setAttribute('webkit-playsinline', 'true');
166
146
  }
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
5
  const react_2 = require("swiper/react");
6
- const hls_js_1 = tslib_1.__importDefault(require("hls.js"));
7
6
  const useIconLink_1 = require("../useIconLink");
8
7
  const FormatImage_1 = tslib_1.__importDefault(require("../FormatImage"));
9
8
  const hooks_1 = require("../../../../core/hooks");
@@ -144,26 +143,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
144
143
  setIsPauseVideo(false);
145
144
  if (!videoRef.current.src) {
146
145
  const videoSrc = rec.video.url;
147
- if (videoSrc.includes('.m3u8')) {
148
- if (hls_js_1.default.isSupported()) {
149
- const hls = new hls_js_1.default();
150
- hls.loadSource(videoSrc);
151
- hls.attachMedia(videoRef.current);
152
- hls.on(hls_js_1.default.Events.MANIFEST_PARSED, function () {
153
- var _a;
154
- (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
155
- });
156
- }
157
- else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
158
- videoRef.current.src = videoSrc;
159
- }
160
- else {
161
- videoRef.current.src = videoSrc;
162
- }
163
- }
164
- else {
165
- videoRef.current.src = videoSrc;
166
- }
146
+ videoRef.current.src = videoSrc;
167
147
  videoRef.current.setAttribute('x5-playsinline', 'true');
168
148
  videoRef.current.setAttribute('webkit-playsinline', 'true');
169
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",