l-min-components 1.7.1553 → 1.7.1555

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.1553",
3
+ "version": "1.7.1555",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -25,28 +25,6 @@ import useTranslation from "../../hooks/useTranslation.jsx";
25
25
  import wordStore from "../../mc/wordStore.json";
26
26
  import ZoomInIcon from "./icons/zoomIn.jsx";
27
27
  import ZoomOutIcon from "./icons/zoomOut.jsx";
28
-
29
- const videoRegistry = new Set();
30
-
31
- function registerVideo(video) {
32
- videoRegistry.add(video);
33
- }
34
-
35
- function unregisterVideo(video) {
36
- videoRegistry.delete(video);
37
- }
38
-
39
- function stopAllVideos() {
40
- videoRegistry.forEach((v) => {
41
- try {
42
- v.pause();
43
- v.currentTime = 0;
44
- } catch (e) {
45
- console.warn("Failed to stop video:", e);
46
- }
47
- });
48
- }
49
-
50
28
  const VideoPlayer2 = ({
51
29
  width,
52
30
  height = "360px",
@@ -87,7 +65,6 @@ const VideoPlayer2 = ({
87
65
  const play = useCallback(() => {
88
66
  if (videoRef?.current && isReady) {
89
67
  videoRef.current.play();
90
- stopAllVideos();
91
68
  }
92
69
  }, [isReady, videoRef?.current]);
93
70
  const pause = useCallback(() => {
@@ -278,14 +255,6 @@ const VideoPlayer2 = ({
278
255
  });
279
256
  }
280
257
  }, []);
281
-
282
- useEffect(() => {
283
- const video = videoRef.current;
284
- if (video) registerVideo(video);
285
- return () => {
286
- if (video) unregisterVideo(video);
287
- };
288
- }, [videoRef]);
289
258
  return (
290
259
  <VideoPlayerContainer
291
260
  ref={playContainerRef}