pb-sxp-ui 1.0.96 → 1.0.97

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 CHANGED
@@ -9683,7 +9683,7 @@ function useOnScreen(ref) {
9683
9683
  * @Author: binruan@chatlabs.com
9684
9684
  * @Date: 2024-01-16 14:50:13
9685
9685
  * @LastEditors: binruan@chatlabs.com
9686
- * @LastEditTime: 2024-06-21 16:34:48
9686
+ * @LastEditTime: 2024-06-24 15:41:25
9687
9687
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
9688
9688
  *
9689
9689
  */
@@ -9700,7 +9700,7 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
9700
9700
  }
9701
9701
  }, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
9702
9702
  const imgSrc = React.useMemo(() => {
9703
- return (src === null || src === void 0 ? void 0 : src.includes('.avif')) ? src : `${src}?imrquality/rquality/40`;
9703
+ return (src === null || src === void 0 ? void 0 : src.includes('.avif')) ? src : `${src}?imrquality/rquality/20`;
9704
9704
  }, [src]);
9705
9705
  return (React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, imgStyle)) },
9706
9706
  React.createElement("div", { ref: ref, hidden: !src, className: css.css({ width: '100%', height: '100%' }) },
@@ -13047,8 +13047,9 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
13047
13047
  if (!videoSrc)
13048
13048
  return;
13049
13049
  const Hls = window === null || window === void 0 ? void 0 : window.Hls;
13050
+ let hls = null;
13050
13051
  if (videoSrc.includes('.m3u8') && Hls && Hls.isSupported()) {
13051
- const hls = new Hls();
13052
+ hls = new Hls();
13052
13053
  hls.loadSource(videoSrc);
13053
13054
  hls.attachMedia(videoRef);
13054
13055
  hls.on(Hls.Events.MANIFEST_PARSED, function () {
@@ -13075,6 +13076,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
13075
13076
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.addEventListener('canplay', handlePlay);
13076
13077
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.addEventListener('waiting', handleWaiting);
13077
13078
  return () => {
13079
+ hls.destroy();
13078
13080
  setIsLoadFinish(false);
13079
13081
  dom2 === null || dom2 === void 0 ? void 0 : dom2.appendChild(dom);
13080
13082
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.removeEventListener('loadedmetadata', handleLoadedmetadata);