l-min-components 1.7.1477 → 1.7.1479

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.7.1477",
3
+ "version": "1.7.1479",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -27,7 +27,7 @@
27
27
  "draft-js": "^0.11.7",
28
28
  "draftjs-to-html": "^0.9.1",
29
29
  "emoji-picker-react": "^4.12.0",
30
- "hls.js": "^1.5.20",
30
+ "hls.js": "^1.6.11",
31
31
  "html-to-draftjs": "^1.5.0",
32
32
  "i": "^0.3.7",
33
33
  "iso-639-1": "^3.1.2",
@@ -120,8 +120,7 @@ const VideoPlayer2 = ({
120
120
 
121
121
  useEffect(() => {
122
122
  const video = videoRef?.current;
123
- if (!video) return null;
124
- let hls;
123
+ if (!video) return;
125
124
 
126
125
  const handlePlay = () => setIsPlaying(true);
127
126
  const handlePause = () => setIsPlaying(false);
@@ -222,6 +221,7 @@ const VideoPlayer2 = ({
222
221
  !error
223
222
  ) {
224
223
  hlsRef.current?.destroy();
224
+ hlsRef.current = null;
225
225
  }
226
226
  }
227
227
  }
@@ -242,10 +242,11 @@ const VideoPlayer2 = ({
242
242
  return () => {
243
243
  if (
244
244
  hlsRef.current &&
245
- typeof hlsRef.current.destroy === "function" &&
245
+ typeof hlsRef.current?.destroy === "function" &&
246
246
  !error
247
247
  ) {
248
- hlsRef.current.destroy();
248
+ hlsRef.current?.destroy();
249
+ hlsRef.current = null;
249
250
  }
250
251
 
251
252
  detachEvents();