l-min-components 1.7.1476 → 1.7.1478
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
|
@@ -218,9 +218,11 @@ 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();
|
|
225
|
+
hlsRef.current = null;
|
|
224
226
|
}
|
|
225
227
|
}
|
|
226
228
|
}
|
|
@@ -239,13 +241,18 @@ const VideoPlayer2 = ({
|
|
|
239
241
|
}
|
|
240
242
|
attachEvents();
|
|
241
243
|
return () => {
|
|
242
|
-
if (
|
|
243
|
-
hlsRef.current
|
|
244
|
+
if (
|
|
245
|
+
hlsRef.current &&
|
|
246
|
+
typeof hlsRef.current?.destroy === "function" &&
|
|
247
|
+
!error
|
|
248
|
+
) {
|
|
249
|
+
hlsRef.current?.destroy();
|
|
250
|
+
hlsRef.current = null;
|
|
244
251
|
}
|
|
245
252
|
|
|
246
253
|
detachEvents();
|
|
247
254
|
};
|
|
248
|
-
}, [url, accountId, accessToken, videoRef.current]);
|
|
255
|
+
}, [url, accountId, accessToken, videoRef.current, error]);
|
|
249
256
|
|
|
250
257
|
return (
|
|
251
258
|
<VideoPlayerContainer
|