l-min-components 1.7.1476 → 1.7.1477

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.1476",
3
+ "version": "1.7.1477",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -218,7 +218,8 @@ const VideoPlayer2 = ({
218
218
  } else {
219
219
  if (
220
220
  hlsRef.current &&
221
- typeof hlsRef.current.destroy === "function"
221
+ typeof hlsRef.current.destroy === "function" &&
222
+ !error
222
223
  ) {
223
224
  hlsRef.current?.destroy();
224
225
  }
@@ -239,13 +240,17 @@ const VideoPlayer2 = ({
239
240
  }
240
241
  attachEvents();
241
242
  return () => {
242
- if (hlsRef.current && typeof hlsRef.current.destroy === "function") {
243
+ if (
244
+ hlsRef.current &&
245
+ typeof hlsRef.current.destroy === "function" &&
246
+ !error
247
+ ) {
243
248
  hlsRef.current.destroy();
244
249
  }
245
250
 
246
251
  detachEvents();
247
252
  };
248
- }, [url, accountId, accessToken, videoRef.current]);
253
+ }, [url, accountId, accessToken, videoRef.current, error]);
249
254
 
250
255
  return (
251
256
  <VideoPlayerContainer