pb-sxp-ui 1.0.97 → 1.0.99

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.js CHANGED
@@ -9660,7 +9660,7 @@ function useOnScreen(ref) {
9660
9660
  * @Author: binruan@chatlabs.com
9661
9661
  * @Date: 2024-01-16 14:50:13
9662
9662
  * @LastEditors: binruan@chatlabs.com
9663
- * @LastEditTime: 2024-06-24 15:41:25
9663
+ * @LastEditTime: 2024-06-24 18:13:14
9664
9664
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
9665
9665
  *
9666
9666
  */
@@ -9676,12 +9676,12 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
9676
9676
  }, rec, item, index);
9677
9677
  }
9678
9678
  }, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
9679
- const imgSrc = useMemo(() => {
9679
+ useMemo(() => {
9680
9680
  return (src === null || src === void 0 ? void 0 : src.includes('.avif')) ? src : `${src}?imrquality/rquality/20`;
9681
9681
  }, [src]);
9682
9682
  return (React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, imgStyle)) },
9683
9683
  React.createElement("div", { ref: ref, hidden: !src, className: css({ width: '100%', height: '100%' }) },
9684
- React.createElement(FormatImage$1, { className: css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? -translateY + 50 : 50}%` }, style)), src: imgSrc }))));
9684
+ React.createElement(FormatImage$1, { className: css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? -translateY + 50 : 50}%` }, style)), src: src }))));
9685
9685
  };
9686
9686
  var Img$1 = memo(Img);
9687
9687
 
@@ -13053,7 +13053,8 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
13053
13053
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.addEventListener('canplay', handlePlay);
13054
13054
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.addEventListener('waiting', handleWaiting);
13055
13055
  return () => {
13056
- hls.destroy();
13056
+ if (hls)
13057
+ hls === null || hls === void 0 ? void 0 : hls.destroy();
13057
13058
  setIsLoadFinish(false);
13058
13059
  dom2 === null || dom2 === void 0 ? void 0 : dom2.appendChild(dom);
13059
13060
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.removeEventListener('loadedmetadata', handleLoadedmetadata);