@nikelroot/video-player 0.1.10 → 0.1.11
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/dist/index.cjs +2 -6
- package/dist/index.js +2 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -871,6 +871,8 @@ var VideoPlayerBase = (props, ref) => {
|
|
|
871
871
|
const fullscreenAllowed = active != null ? active : true;
|
|
872
872
|
const onTimeChangeRef = (0, import_react3.useRef)(onTimeChange);
|
|
873
873
|
const onDurationChangeRef = (0, import_react3.useRef)(onDurationChange);
|
|
874
|
+
onTimeChangeRef.current = onTimeChange;
|
|
875
|
+
onDurationChangeRef.current = onDurationChange;
|
|
874
876
|
const setTimeD = (0, import_react3.useRef)(
|
|
875
877
|
createThrottledNumberFn((value) => {
|
|
876
878
|
const v = videoRef.current;
|
|
@@ -934,12 +936,6 @@ var VideoPlayerBase = (props, ref) => {
|
|
|
934
936
|
},
|
|
935
937
|
[onActiveChange]
|
|
936
938
|
);
|
|
937
|
-
(0, import_react3.useEffect)(() => {
|
|
938
|
-
onTimeChangeRef.current = onTimeChange;
|
|
939
|
-
}, [onTimeChange]);
|
|
940
|
-
(0, import_react3.useEffect)(() => {
|
|
941
|
-
onDurationChangeRef.current = onDurationChange;
|
|
942
|
-
}, [onDurationChange]);
|
|
943
939
|
const onTime = (0, import_react3.useCallback)(() => {
|
|
944
940
|
var _a;
|
|
945
941
|
const el = videoRef.current;
|
package/dist/index.js
CHANGED
|
@@ -842,6 +842,8 @@ var VideoPlayerBase = (props, ref) => {
|
|
|
842
842
|
const fullscreenAllowed = active != null ? active : true;
|
|
843
843
|
const onTimeChangeRef = useRef2(onTimeChange);
|
|
844
844
|
const onDurationChangeRef = useRef2(onDurationChange);
|
|
845
|
+
onTimeChangeRef.current = onTimeChange;
|
|
846
|
+
onDurationChangeRef.current = onDurationChange;
|
|
845
847
|
const setTimeD = useRef2(
|
|
846
848
|
createThrottledNumberFn((value) => {
|
|
847
849
|
const v = videoRef.current;
|
|
@@ -905,12 +907,6 @@ var VideoPlayerBase = (props, ref) => {
|
|
|
905
907
|
},
|
|
906
908
|
[onActiveChange]
|
|
907
909
|
);
|
|
908
|
-
useEffect(() => {
|
|
909
|
-
onTimeChangeRef.current = onTimeChange;
|
|
910
|
-
}, [onTimeChange]);
|
|
911
|
-
useEffect(() => {
|
|
912
|
-
onDurationChangeRef.current = onDurationChange;
|
|
913
|
-
}, [onDurationChange]);
|
|
914
910
|
const onTime = useCallback(() => {
|
|
915
911
|
var _a;
|
|
916
912
|
const el = videoRef.current;
|