softbuilders-react-video-player 1.2.7 → 1.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,8 +47,7 @@ const Component = forwardRef(({ options, notes, chapters, startTime = 0, handleS
47
47
  getTracks();
48
48
  }, [options === null || options === void 0 ? void 0 : options.tracks]);
49
49
  const id = (Date.now() + Math.random() * 100).toString();
50
- console.log("id: ", id);
51
- return (_jsx(VideoPlayerComponent, { id: videoId, chapters: chapters, options: Object.assign(Object.assign({}, options), { tracks }), notes: notes, poster: "", startTime: startTime, handleSaveNoteAction: handleSaveNoteAction, disableNote: disableNote, onPause: onPause, onPlay: onPlay, childRef: childRef, bottomRedBar: bottomRedBar, noteButtonClick: noteButtonClick }));
50
+ return (_jsx(VideoPlayerComponent, { id: videoId || "", chapters: chapters, options: Object.assign(Object.assign({}, options), { tracks }), notes: notes, poster: "", startTime: startTime, handleSaveNoteAction: handleSaveNoteAction, disableNote: disableNote, onPause: onPause, onPlay: onPlay, childRef: childRef, bottomRedBar: bottomRedBar, noteButtonClick: noteButtonClick }));
52
51
  });
53
52
  const SoftBuildersVideoPlayer = memo(Component, (prevProps, nextProps) => {
54
53
  return (isEqual(prevProps.options, nextProps.options) &&
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SoftBuildersVideoPlayer/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAO3D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,MAAM,eAAe,GAAmC;IACtD,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;IACV,OAAO,E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ACnC,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;QACzC,SAAS,CAAC,SAAS,KAAK,SAAS,CAAC,SAAS,CAC5C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,uBAAuB,CAAC"}
@@ -1,133 +1,128 @@
1
1
  import React, { forwardRef, memo, useEffect, useState } from "react";
2
2
  import VideoPlayerComponent from "../VideoPlayerComponent";
3
3
  import {
4
- SoftBuildersVideoPlayerChapter,
5
- SoftBuildersVideoPlayerNote,
6
- SoftBuildersVideoPlayerOptions,
7
- SoftBuildersVideoPlayerTrack,
4
+ SoftBuildersVideoPlayerChapter,
5
+ SoftBuildersVideoPlayerNote,
6
+ SoftBuildersVideoPlayerOptions,
7
+ SoftBuildersVideoPlayerTrack,
8
8
  } from "../../types";
9
9
  import { convertSRTtoVTT } from "../../utils";
10
10
  import { isEqual } from "lodash";
11
11
  const DEFAULT_OPTIONS: SoftBuildersVideoPlayerOptions = {
12
- autoplay: false,
13
- controls: true,
14
- fluid: false,
15
- muted: true,
16
- height: 420,
17
- width: 720,
18
- sources: [],
19
- tracks: [],
12
+ autoplay: false,
13
+ controls: true,
14
+ fluid: false,
15
+ muted: true,
16
+ height: 420,
17
+ width: 720,
18
+ sources: [],
19
+ tracks: [],
20
20
  };
21
21
 
22
22
  export type Props<T = any> = {
23
- options: SoftBuildersVideoPlayerOptions;
24
- notes?: SoftBuildersVideoPlayerNote[];
25
- chapters?: SoftBuildersVideoPlayerChapter[];
26
- startTime?: number;
27
- handleSaveNoteAction?: (time: number, note: string) => Promise<T>;
28
- onPlay?: (time: number) => void;
29
- onPause?: (time: number) => void;
30
- isFocused?: boolean;
31
- disableNote?: boolean;
32
- bottomRedBar?: boolean;
33
- childRef?: React.Ref<HTMLDivElement>;
34
- noteButtonClick?: (e: any) => void;
35
- videoId?: string;
23
+ options: SoftBuildersVideoPlayerOptions;
24
+ notes?: SoftBuildersVideoPlayerNote[];
25
+ chapters?: SoftBuildersVideoPlayerChapter[];
26
+ startTime?: number;
27
+ handleSaveNoteAction?: (time: number, note: string) => Promise<T>;
28
+ onPlay?: (time: number) => void;
29
+ onPause?: (time: number) => void;
30
+ isFocused?: boolean;
31
+ disableNote?: boolean;
32
+ bottomRedBar?: boolean;
33
+ childRef?: React.Ref<HTMLDivElement>;
34
+ noteButtonClick?: (e: any) => void;
35
+ videoId?: string;
36
36
  };
37
37
 
38
38
  const Component = forwardRef<HTMLDivElement, Props<any>>(
39
- ({
40
- options,
41
- notes,
42
- chapters,
43
- startTime = 0,
44
- handleSaveNoteAction,
45
- onPlay,
46
- onPause,
47
- isFocused = true,
48
- disableNote,
49
- childRef,
50
- bottomRedBar,
51
- noteButtonClick,
52
- videoId,
53
- }: Props<any>) => {
54
- options = {
55
- ...options,
56
- responsive: true,
57
- inactivityTimeout: 0,
58
- fullscreen: {
59
- navigationUI: "hide",
60
- },
61
- } as any;
39
+ ({
40
+ options,
41
+ notes,
42
+ chapters,
43
+ startTime = 0,
44
+ handleSaveNoteAction,
45
+ onPlay,
46
+ onPause,
47
+ isFocused = true,
48
+ disableNote,
49
+ childRef,
50
+ bottomRedBar,
51
+ noteButtonClick,
52
+ videoId,
53
+ }: Props<any>) => {
54
+ options = {
55
+ ...options,
56
+ responsive: true,
57
+ inactivityTimeout: 0,
58
+ fullscreen: {
59
+ navigationUI: "hide",
60
+ },
61
+ } as any;
62
62
 
63
- if (options.autoplay === undefined)
64
- options.autoplay = DEFAULT_OPTIONS.autoplay;
65
- if (options.controls === undefined)
66
- options.controls = DEFAULT_OPTIONS.controls;
67
- if (options.fluid === undefined) options.fluid = DEFAULT_OPTIONS.fluid;
68
- if (options?.muted === undefined)
69
- options.muted = DEFAULT_OPTIONS?.muted;
70
- if (options.height === undefined)
71
- options.height = DEFAULT_OPTIONS.height;
72
- if (options.width === undefined) options.width = DEFAULT_OPTIONS.width;
63
+ if (options.autoplay === undefined)
64
+ options.autoplay = DEFAULT_OPTIONS.autoplay;
65
+ if (options.controls === undefined)
66
+ options.controls = DEFAULT_OPTIONS.controls;
67
+ if (options.fluid === undefined) options.fluid = DEFAULT_OPTIONS.fluid;
68
+ if (options?.muted === undefined) options.muted = DEFAULT_OPTIONS?.muted;
69
+ if (options.height === undefined) options.height = DEFAULT_OPTIONS.height;
70
+ if (options.width === undefined) options.width = DEFAULT_OPTIONS.width;
73
71
 
74
- const [tracks, setTracks] = useState<SoftBuildersVideoPlayerTrack[]>(
75
- []
76
- );
77
- useEffect(() => {}, [isFocused]);
78
- useEffect(() => {
79
- const getTracks = async () => {
80
- const newTracks: SoftBuildersVideoPlayerTrack[] = [];
81
- if (Array.isArray(options?.tracks))
82
- for (const [i, s] of options?.tracks.entries()) {
83
- let src = s.src;
72
+ const [tracks, setTracks] = useState<SoftBuildersVideoPlayerTrack[]>([]);
73
+ useEffect(() => {}, [isFocused]);
74
+ useEffect(() => {
75
+ const getTracks = async () => {
76
+ const newTracks: SoftBuildersVideoPlayerTrack[] = [];
77
+ if (Array.isArray(options?.tracks))
78
+ for (const [i, s] of options?.tracks.entries()) {
79
+ let src = s.src;
84
80
 
85
- if (s.memeType == "text/srt") {
86
- src = await convertSRTtoVTT(s.src);
87
- }
81
+ if (s.memeType == "text/srt") {
82
+ src = await convertSRTtoVTT(s.src);
83
+ }
88
84
 
89
- newTracks.push({
90
- ...s,
91
- src,
92
- });
93
- }
85
+ newTracks.push({
86
+ ...s,
87
+ src,
88
+ });
89
+ }
94
90
 
95
- setTracks(newTracks);
96
- };
91
+ setTracks(newTracks);
92
+ };
97
93
 
98
- getTracks();
99
- }, [options?.tracks]);
94
+ getTracks();
95
+ }, [options?.tracks]);
100
96
 
101
- const id = (Date.now() + Math.random() * 100).toString();
102
- console.log("id: ", id);
97
+ const id = (Date.now() + Math.random() * 100).toString();
103
98
 
104
- return (
105
- <VideoPlayerComponent
106
- id={videoId || ""}
107
- chapters={chapters}
108
- options={{ ...options, tracks }}
109
- notes={notes}
110
- poster=""
111
- startTime={startTime}
112
- handleSaveNoteAction={handleSaveNoteAction}
113
- disableNote={disableNote}
114
- onPause={onPause}
115
- onPlay={onPlay}
116
- childRef={childRef}
117
- bottomRedBar={bottomRedBar}
118
- noteButtonClick={noteButtonClick}
119
- />
120
- );
121
- }
99
+ return (
100
+ <VideoPlayerComponent
101
+ id={videoId || ""}
102
+ chapters={chapters}
103
+ options={{ ...options, tracks }}
104
+ notes={notes}
105
+ poster=""
106
+ startTime={startTime}
107
+ handleSaveNoteAction={handleSaveNoteAction}
108
+ disableNote={disableNote}
109
+ onPause={onPause}
110
+ onPlay={onPlay}
111
+ childRef={childRef}
112
+ bottomRedBar={bottomRedBar}
113
+ noteButtonClick={noteButtonClick}
114
+ />
115
+ );
116
+ }
122
117
  );
123
118
 
124
119
  const SoftBuildersVideoPlayer = memo(Component, (prevProps, nextProps) => {
125
- return (
126
- isEqual(prevProps.options, nextProps.options) &&
127
- prevProps.notes === nextProps.notes &&
128
- prevProps.chapters === nextProps.chapters &&
129
- prevProps.startTime === nextProps.startTime
130
- );
120
+ return (
121
+ isEqual(prevProps.options, nextProps.options) &&
122
+ prevProps.notes === nextProps.notes &&
123
+ prevProps.chapters === nextProps.chapters &&
124
+ prevProps.startTime === nextProps.startTime
125
+ );
131
126
  });
132
127
 
133
128
  export default SoftBuildersVideoPlayer;
@@ -4,6 +4,7 @@ import ReactDOM from "react-dom/client";
4
4
  import videojs from "video.js";
5
5
  import "video.js/dist/video-js.css";
6
6
  import ControlBar from "../ControlBar";
7
+ import { isEqual } from "lodash";
7
8
  import "./style/style.css";
8
9
  import "../../styles/tailwind.css";
9
10
  import { SoftBuildersVideoPlayerProvider } from "./provider";
@@ -32,7 +33,6 @@ const renderControlBar = (id, player, isPaused, setIsPaused, duration, notes, ch
32
33
  const element = container.querySelector(".vjs-control-bar");
33
34
  if (element) {
34
35
  if (!controlBarRoot[id]) {
35
- console.log("pooklo");
36
36
  controlBarRoot[id] = ReactDOM.createRoot(element);
37
37
  }
38
38
  element.style.display = "flex";
@@ -63,7 +63,6 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
63
63
  playerRef.current = player;
64
64
  setIsReady(true);
65
65
  player === null || player === void 0 ? void 0 : player.currentTime(startTime);
66
- console.log("startTime: ", startTime);
67
66
  player.on("waiting", () => { });
68
67
  player.on("dispose", () => {
69
68
  videojs.log("player will dispose");
@@ -97,7 +96,6 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
97
96
  idRef.current = options;
98
97
  playerRef.current.dispose();
99
98
  playerRef.current = undefined;
100
- console.log("dispose8: ");
101
99
  setTimeout(() => {
102
100
  if (bigPlayButtonRoot[id]) {
103
101
  bigPlayButtonRoot[id].unmount();
@@ -121,17 +119,63 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
121
119
  }
122
120
  };
123
121
  }, [id]);
122
+ useEffect(() => {
123
+ if (!playerRef.current) {
124
+ const videoElement = document.createElement("video-js");
125
+ videoElement.setAttribute("playsinline", "true");
126
+ videoElement.classList.add("vjs-big-play-centered");
127
+ // Set the poster attribute here
128
+ if (poster) {
129
+ videoElement.setAttribute("poster", poster);
130
+ }
131
+ videoRef.current.appendChild(videoElement);
132
+ videoElement.style.width = "100%";
133
+ videoElement.style.height = "100%";
134
+ videoElement.style.objectFit = "cover";
135
+ playerRef.current = videojs(videoElement, options, () => {
136
+ onReady(playerRef.current);
137
+ });
138
+ }
139
+ return () => {
140
+ var _a, _b;
141
+ if (playerRef.current) {
142
+ if (!isEqual((_b = (_a = idRef === null || idRef === void 0 ? void 0 : idRef.current) === null || _a === void 0 ? void 0 : _a.sources) !== null && _b !== void 0 ? _b : "", options.sources)) {
143
+ idRef.current = options;
144
+ playerRef.current.dispose();
145
+ playerRef.current = undefined;
146
+ setTimeout(() => {
147
+ if (bigPlayButtonRoot[id]) {
148
+ bigPlayButtonRoot[id].unmount();
149
+ bigPlayButtonRoot[id] = undefined;
150
+ }
151
+ if (controlBarRoot[id]) {
152
+ controlBarRoot[id].unmount();
153
+ controlBarRoot[id] = undefined;
154
+ }
155
+ }, 0);
156
+ }
157
+ // setTimeout(() => {
158
+ // if (bigPlayButtonRoot[id]) {
159
+ // bigPlayButtonRoot[id].unmount();
160
+ // bigPlayButtonRoot[id] = undefined;
161
+ // }
162
+ // if (controlBarRoot[id]) {
163
+ // controlBarRoot[id].unmount();
164
+ // controlBarRoot[id] = undefined;
165
+ // }
166
+ // }, 0);
167
+ }
168
+ };
169
+ }, [options]);
124
170
  // Added poster to dependency array
125
171
  useEffect(() => {
126
172
  if (playerRef.current) {
127
- console.log("time");
128
173
  playerRef.current.currentTime(startTime);
129
174
  }
130
175
  }, [startTime]);
131
176
  useEffect(() => {
132
177
  if (playerRef.current && isReady) {
133
178
  const currentTime = playerRef.current.currentTime() || 0;
134
- console.log("currentTime: ", currentTime);
135
179
  if (isPaused) {
136
180
  if (onPause)
137
181
  onPause(currentTime);
@@ -212,7 +256,6 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
212
256
  }
213
257
  }, [isQualityMenuOpen, isSubtitleMenuOpen]);
214
258
  useEffect(() => {
215
- console.log("isNoteOpen: ", isNoteOpen);
216
259
  if (isNoteOpen) {
217
260
  if (timeoutRef.current) {
218
261
  clearTimeout(timeoutRef.current);
@@ -300,7 +343,6 @@ const VideoPlayerComponent = forwardRef(({ id, options, notes, chapters, startTi
300
343
  if (playerRef.current && isReady) {
301
344
  const currentTime = playerRef.current.currentTime();
302
345
  const duration = playerRef.current.duration();
303
- console.log("duration: ", duration, currentTime);
304
346
  if (duration && currentTime !== undefined) {
305
347
  setTimeSeeker(`${(currentTime / duration) * 100}%`);
306
348
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/VideoPlayerComponent/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,QAAQ,MAAM,kBAAkB,CAAC;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AAG,GAAG,CAAC,CAAC;gBACtD,CAAC;qBAAM,CAAC;oBACN,aAAa,CAAC,GAAG,CAAC,CAAC;gBACrB,CAAC;YACH,CAAC;QACH,CAAC,CAAC;QAEF,MAAM,QAAQ,GAAG,WAAW,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC,CAAC,qBAAqB;QAE1E,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,8BAA8B;IACtE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,CACL,eACE,GAAG,EAAE,SAAS,EACd,EAAE,EAAE,mBAAmB,EAAE,EAAE,EAC3B,WAAW,EAAE,GAAG,EAAE;YAChB,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACpD,CAAC,EACD,SAAS,EAAC,gFAAgF,EAC1F,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EACtC,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,aAEtC,YAAY,IAAI,CACf,cACE,GAAG,EAAE,QAAQ,EACb,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,+IACT,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,gBACtC,EAAE,EACF,KAAK,EAAE;oBACL,KAAK,EAAE,UAAU;iBAClB,GACI,CACR,EACD,cACE,SAAS,EAAC,6CAA6C,qCAIvD,cACE,OAAO,EAAE,iBAAiB,EAC1B,GAAG,EAAE,QAAQ,EACb,SAAS,EAAC,iCAAiC,GACtC,GACH,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,eAAe,oBAAoB,CAAC"}
@@ -76,8 +76,6 @@ const renderControlBar = <T,>(
76
76
  const element: any = container.querySelector(".vjs-control-bar");
77
77
  if (element) {
78
78
  if (!controlBarRoot[id]) {
79
- console.log("pooklo");
80
-
81
79
  controlBarRoot[id] = ReactDOM.createRoot(element as HTMLElement);
82
80
  }
83
81
  element.style.display = "flex";
@@ -165,7 +163,6 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
165
163
  setIsReady(true);
166
164
 
167
165
  player?.currentTime(startTime);
168
- console.log("startTime: ", startTime);
169
166
 
170
167
  player.on("waiting", () => {});
171
168
  player.on("dispose", () => {
@@ -202,7 +199,6 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
202
199
  idRef.current = options;
203
200
  playerRef.current.dispose();
204
201
  playerRef.current = undefined;
205
- console.log("dispose8: ");
206
202
  setTimeout(() => {
207
203
  if (bigPlayButtonRoot[id]) {
208
204
  bigPlayButtonRoot[id].unmount();
@@ -227,19 +223,66 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
227
223
  }
228
224
  };
229
225
  }, [id]);
226
+ useEffect(() => {
227
+ if (!playerRef.current) {
228
+ const videoElement = document.createElement("video-js");
229
+
230
+ videoElement.setAttribute("playsinline", "true");
231
+
232
+ videoElement.classList.add("vjs-big-play-centered");
233
+ // Set the poster attribute here
234
+ if (poster) {
235
+ videoElement.setAttribute("poster", poster);
236
+ }
237
+ videoRef.current.appendChild(videoElement);
238
+ videoElement.style.width = "100%";
239
+ videoElement.style.height = "100%";
240
+ videoElement.style.objectFit = "cover";
241
+ playerRef.current = videojs(videoElement, options, () => {
242
+ onReady(playerRef.current as Player);
243
+ });
244
+ }
245
+ return () => {
246
+ if (playerRef.current) {
247
+ if (!isEqual(idRef?.current?.sources ?? "", options.sources)) {
248
+ idRef.current = options;
249
+ playerRef.current.dispose();
250
+ playerRef.current = undefined;
251
+ setTimeout(() => {
252
+ if (bigPlayButtonRoot[id]) {
253
+ bigPlayButtonRoot[id].unmount();
254
+ bigPlayButtonRoot[id] = undefined;
255
+ }
256
+ if (controlBarRoot[id]) {
257
+ controlBarRoot[id].unmount();
258
+ controlBarRoot[id] = undefined;
259
+ }
260
+ }, 0);
261
+ }
262
+
263
+ // setTimeout(() => {
264
+ // if (bigPlayButtonRoot[id]) {
265
+ // bigPlayButtonRoot[id].unmount();
266
+ // bigPlayButtonRoot[id] = undefined;
267
+ // }
268
+ // if (controlBarRoot[id]) {
269
+ // controlBarRoot[id].unmount();
270
+ // controlBarRoot[id] = undefined;
271
+ // }
272
+ // }, 0);
273
+ }
274
+ };
275
+ }, [options]);
230
276
  // Added poster to dependency array
231
277
 
232
278
  useEffect(() => {
233
279
  if (playerRef.current) {
234
- console.log("time");
235
-
236
280
  playerRef.current.currentTime(startTime);
237
281
  }
238
282
  }, [startTime]);
239
283
  useEffect(() => {
240
284
  if (playerRef.current && isReady) {
241
285
  const currentTime = playerRef.current.currentTime() || 0;
242
- console.log("currentTime: ", currentTime);
243
286
  if (isPaused) {
244
287
  if (onPause) onPause(currentTime);
245
288
  } else {
@@ -341,8 +384,6 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
341
384
  }
342
385
  }, [isQualityMenuOpen, isSubtitleMenuOpen]);
343
386
  useEffect(() => {
344
- console.log("isNoteOpen: ", isNoteOpen);
345
-
346
387
  if (isNoteOpen) {
347
388
  if (timeoutRef.current) {
348
389
  clearTimeout(timeoutRef.current);
@@ -433,7 +474,6 @@ const VideoPlayerComponent = forwardRef<HTMLDivElement, Props<any>>(
433
474
  if (playerRef.current && isReady) {
434
475
  const currentTime = playerRef.current.currentTime();
435
476
  const duration = playerRef.current.duration();
436
- console.log("duration: ", duration, currentTime);
437
477
 
438
478
  if (duration && currentTime !== undefined) {
439
479
  setTimeSeeker(`${(currentTime / duration) * 100}%`);
package/dist/index.mjs CHANGED
@@ -1525,6 +1525,9 @@ var ControlBar = ({
1525
1525
  };
1526
1526
  var ControlBar_default = ControlBar;
1527
1527
 
1528
+ // src/components/VideoPlayerComponent/index.tsx
1529
+ import { isEqual } from "lodash";
1530
+
1528
1531
  // src/components/BigPlayButton/index.tsx
1529
1532
  import { jsx as jsx35 } from "react/jsx-runtime";
1530
1533
  var BigPlayButton = ({ player, isPaused, setIsPaused }) => {
@@ -1580,7 +1583,6 @@ var renderControlBar = (id, player, isPaused, setIsPaused, duration, notes, chap
1580
1583
  const element = container.querySelector(".vjs-control-bar");
1581
1584
  if (element) {
1582
1585
  if (!controlBarRoot[id]) {
1583
- console.log("pooklo");
1584
1586
  controlBarRoot[id] = ReactDOM.createRoot(element);
1585
1587
  }
1586
1588
  element.style.display = "flex";
@@ -1648,7 +1650,6 @@ var VideoPlayerComponent = forwardRef(
1648
1650
  playerRef.current = player;
1649
1651
  setIsReady(true);
1650
1652
  player == null ? void 0 : player.currentTime(startTime);
1651
- console.log("startTime: ", startTime);
1652
1653
  player.on("waiting", () => {
1653
1654
  });
1654
1655
  player.on("dispose", () => {
@@ -1682,7 +1683,6 @@ var VideoPlayerComponent = forwardRef(
1682
1683
  idRef.current = options;
1683
1684
  playerRef.current.dispose();
1684
1685
  playerRef.current = void 0;
1685
- console.log("dispose8: ");
1686
1686
  setTimeout(() => {
1687
1687
  if (bigPlayButtonRoot[id]) {
1688
1688
  bigPlayButtonRoot[id].unmount();
@@ -1696,16 +1696,51 @@ var VideoPlayerComponent = forwardRef(
1696
1696
  }
1697
1697
  };
1698
1698
  }, [id]);
1699
+ useEffect14(() => {
1700
+ if (!playerRef.current) {
1701
+ const videoElement = document.createElement("video-js");
1702
+ videoElement.setAttribute("playsinline", "true");
1703
+ videoElement.classList.add("vjs-big-play-centered");
1704
+ if (poster) {
1705
+ videoElement.setAttribute("poster", poster);
1706
+ }
1707
+ videoRef.current.appendChild(videoElement);
1708
+ videoElement.style.width = "100%";
1709
+ videoElement.style.height = "100%";
1710
+ videoElement.style.objectFit = "cover";
1711
+ playerRef.current = videojs(videoElement, options, () => {
1712
+ onReady(playerRef.current);
1713
+ });
1714
+ }
1715
+ return () => {
1716
+ var _a, _b;
1717
+ if (playerRef.current) {
1718
+ if (!isEqual((_b = (_a = idRef == null ? void 0 : idRef.current) == null ? void 0 : _a.sources) != null ? _b : "", options.sources)) {
1719
+ idRef.current = options;
1720
+ playerRef.current.dispose();
1721
+ playerRef.current = void 0;
1722
+ setTimeout(() => {
1723
+ if (bigPlayButtonRoot[id]) {
1724
+ bigPlayButtonRoot[id].unmount();
1725
+ bigPlayButtonRoot[id] = void 0;
1726
+ }
1727
+ if (controlBarRoot[id]) {
1728
+ controlBarRoot[id].unmount();
1729
+ controlBarRoot[id] = void 0;
1730
+ }
1731
+ }, 0);
1732
+ }
1733
+ }
1734
+ };
1735
+ }, [options]);
1699
1736
  useEffect14(() => {
1700
1737
  if (playerRef.current) {
1701
- console.log("time");
1702
1738
  playerRef.current.currentTime(startTime);
1703
1739
  }
1704
1740
  }, [startTime]);
1705
1741
  useEffect14(() => {
1706
1742
  if (playerRef.current && isReady) {
1707
1743
  const currentTime = playerRef.current.currentTime() || 0;
1708
- console.log("currentTime: ", currentTime);
1709
1744
  if (isPaused) {
1710
1745
  if (onPause) onPause(currentTime);
1711
1746
  } else {
@@ -1788,7 +1823,6 @@ var VideoPlayerComponent = forwardRef(
1788
1823
  }
1789
1824
  }, [isQualityMenuOpen, isSubtitleMenuOpen]);
1790
1825
  useEffect14(() => {
1791
- console.log("isNoteOpen: ", isNoteOpen);
1792
1826
  if (isNoteOpen) {
1793
1827
  if (timeoutRef.current) {
1794
1828
  clearTimeout(timeoutRef.current);
@@ -1873,7 +1907,6 @@ var VideoPlayerComponent = forwardRef(
1873
1907
  if (playerRef.current && isReady) {
1874
1908
  const currentTime = playerRef.current.currentTime();
1875
1909
  const duration2 = playerRef.current.duration();
1876
- console.log("duration: ", duration2, currentTime);
1877
1910
  if (duration2 && currentTime !== void 0) {
1878
1911
  setTimeSeeker(`${currentTime / duration2 * 100}%`);
1879
1912
  } else {
@@ -1930,7 +1963,7 @@ var VideoPlayerComponent = forwardRef(
1930
1963
  var VideoPlayerComponent_default = VideoPlayerComponent;
1931
1964
 
1932
1965
  // src/components/SoftBuildersVideoPlayer/index.tsx
1933
- import { isEqual } from "lodash";
1966
+ import { isEqual as isEqual2 } from "lodash";
1934
1967
  import { jsx as jsx37 } from "react/jsx-runtime";
1935
1968
  var DEFAULT_OPTIONS = {
1936
1969
  autoplay: false,
@@ -1994,11 +2027,10 @@ var Component = forwardRef2(
1994
2027
  getTracks();
1995
2028
  }, [options == null ? void 0 : options.tracks]);
1996
2029
  const id = (Date.now() + Math.random() * 100).toString();
1997
- console.log("id: ", id);
1998
2030
  return /* @__PURE__ */ jsx37(
1999
2031
  VideoPlayerComponent_default,
2000
2032
  {
2001
- id: videoId,
2033
+ id: videoId || "",
2002
2034
  chapters,
2003
2035
  options: __spreadProps(__spreadValues({}, options), { tracks }),
2004
2036
  notes,
@@ -2016,7 +2048,7 @@ var Component = forwardRef2(
2016
2048
  }
2017
2049
  );
2018
2050
  var SoftBuildersVideoPlayer = memo(Component, (prevProps, nextProps) => {
2019
- return isEqual(prevProps.options, nextProps.options) && prevProps.notes === nextProps.notes && prevProps.chapters === nextProps.chapters && prevProps.startTime === nextProps.startTime;
2051
+ return isEqual2(prevProps.options, nextProps.options) && prevProps.notes === nextProps.notes && prevProps.chapters === nextProps.chapters && prevProps.startTime === nextProps.startTime;
2020
2052
  });
2021
2053
  var SoftBuildersVideoPlayer_default = SoftBuildersVideoPlayer;
2022
2054
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "softbuilders-react-video-player",
3
3
  "description": "Standalone video player component",
4
- "version": "1.2.7",
4
+ "version": "1.2.9",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [