@zezosoft/react-player 1.0.0 → 1.0.2

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.
Files changed (41) hide show
  1. package/README.md +155 -514
  2. package/dist/VideoPlayer/components/controls/BottomControls.d.ts +4 -1
  3. package/dist/VideoPlayer/components/controls/MiddleControls.d.ts +7 -1
  4. package/dist/VideoPlayer/components/controls/VideoPlayerControls.d.ts +4 -1
  5. package/dist/VideoPlayer/components/time-line/TimeLine.d.ts +5 -0
  6. package/dist/VideoPlayer/components/time-line/components/HoverTimeWithPreview.d.ts +1 -0
  7. package/dist/VideoPlayer/components/time-line/components/TimeCodeItem.d.ts +3 -0
  8. package/dist/VideoPlayer/components/time-line/components/TimeCodes.d.ts +3 -0
  9. package/dist/VideoPlayer/hooks/useVideoSource.d.ts +1 -1
  10. package/dist/VideoPlayer/types/VideoPlayerTypes.d.ts +16 -0
  11. package/dist/components/ui/LiveIndicator.d.ts +9 -0
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.js +124 -111
  14. package/dist/store/types/StoreTypes.d.ts +2 -0
  15. package/package.json +6 -7
  16. package/dist/VideoPlayer/MediaControls/BottomControls.d.ts +0 -5
  17. package/dist/VideoPlayer/MediaControls/ControlsHeader.d.ts +0 -5
  18. package/dist/VideoPlayer/MediaControls/MiddleControls.d.ts +0 -3
  19. package/dist/VideoPlayer/MediaControls/VideoPlayerControls.d.ts +0 -4
  20. package/dist/VideoPlayer/_components/BottomControls.d.ts +0 -5
  21. package/dist/VideoPlayer/_components/ControlsHeader.d.ts +0 -5
  22. package/dist/VideoPlayer/_components/MiddleControls.d.ts +0 -3
  23. package/dist/VideoPlayer/_components/Overlay.d.ts +0 -4
  24. package/dist/VideoPlayer/_components/SubtitleOverlay.d.ts +0 -7
  25. package/dist/VideoPlayer/_components/TimeLine/TimeLine.d.ts +0 -20
  26. package/dist/VideoPlayer/_components/TimeLine/_components/hoverTimeWithPreview.d.ts +0 -16
  27. package/dist/VideoPlayer/_components/TimeLine/_components/thumb.d.ts +0 -9
  28. package/dist/VideoPlayer/_components/TimeLine/_components/timeCodeItem.d.ts +0 -21
  29. package/dist/VideoPlayer/_components/TimeLine/_components/timeCodes.d.ts +0 -15
  30. package/dist/VideoPlayer/_components/TimeLine/utils/getEndTimeByIndex.d.ts +0 -2
  31. package/dist/VideoPlayer/_components/TimeLine/utils/getHoverTimePosition.d.ts +0 -3
  32. package/dist/VideoPlayer/_components/TimeLine/utils/getPositionPercent.d.ts +0 -1
  33. package/dist/VideoPlayer/_components/TimeLine/utils/getTimeScale.d.ts +0 -1
  34. package/dist/VideoPlayer/_components/TimeLine/utils/isInRange.d.ts +0 -1
  35. package/dist/VideoPlayer/_components/TimeLine/utils/positionToMs.d.ts +0 -1
  36. package/dist/VideoPlayer/_components/TimeLine/utils/secondsToTime.d.ts +0 -6
  37. package/dist/VideoPlayer/_components/TimeLine/utils/timeToTimeString.d.ts +0 -1
  38. package/dist/VideoPlayer/_components/VideoPlayerControls.d.ts +0 -4
  39. package/dist/VideoPlayer/hooks/useNetworkSpeed.d.ts +0 -7
  40. package/dist/components/ui/PiPictureInPictureToggle.d.ts +0 -8
  41. /package/dist/components/ui/{tooltip.d.ts → Tooltip.d.ts} +0 -0
@@ -1,5 +1,8 @@
1
1
  import React from "react";
2
2
  import "../time-line/time-line.css";
3
3
  import { IControlsBottomProps } from "../../../types";
4
- declare const BottomControls: React.FC<IControlsBottomProps>;
4
+ interface BottomControlsProps extends IControlsBottomProps {
5
+ isLive?: boolean;
6
+ }
7
+ declare const BottomControls: React.FC<BottomControlsProps>;
5
8
  export default BottomControls;
@@ -1,3 +1,9 @@
1
1
  import React from "react";
2
- declare const MiddleControls: React.FC;
2
+ import type { PlayPauseButtonConfig } from "../../types/VideoPlayerTypes";
3
+ interface MiddleControlsProps {
4
+ config?: {
5
+ playPauseButtonConfig?: PlayPauseButtonConfig;
6
+ };
7
+ }
8
+ declare const MiddleControls: React.FC<MiddleControlsProps>;
3
9
  export default MiddleControls;
@@ -1,4 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { IPlayerConfig } from "../../../types";
3
- declare const VideoPlayerControls: React.FC<IPlayerConfig>;
3
+ interface VideoPlayerControlsProps extends IPlayerConfig {
4
+ isLive?: boolean;
5
+ }
6
+ declare const VideoPlayerControls: React.FC<VideoPlayerControlsProps>;
4
7
  export default VideoPlayerControls;
@@ -17,5 +17,10 @@ export interface TimeLineProps {
17
17
  onChange: (time: number, offsetTime: number) => void;
18
18
  getPreviewScreenUrl?: (hoverTimeValue: number) => string;
19
19
  trackColor?: string;
20
+ bufferColor?: string;
21
+ hoverColor?: string;
22
+ thumbColor?: string;
23
+ trackBackgroundColor?: string;
24
+ isLive?: boolean;
20
25
  }
21
26
  export declare const VideoSeekSlider: React.FC<TimeLineProps>;
@@ -11,6 +11,7 @@ interface HoverTimeWithPreviewProps {
11
11
  secondsPrefix?: string;
12
12
  minutesPrefix?: string;
13
13
  getPreviewScreenUrl?: (hoverTimeValue: number) => string;
14
+ isLive?: boolean;
14
15
  }
15
16
  export declare const HoverTimeWithPreview: React.FC<HoverTimeWithPreviewProps>;
16
17
  export {};
@@ -17,5 +17,8 @@ export interface TimeCodeItemProps {
17
17
  onHover?: (label: string) => void;
18
18
  withGap?: boolean;
19
19
  trackColor?: string;
20
+ bufferColor?: string;
21
+ hoverColor?: string;
22
+ trackBackgroundColor?: string;
20
23
  }
21
24
  export declare const TimeCodeItem: React.FC<TimeCodeItemProps>;
@@ -11,5 +11,8 @@ export interface TimeCodesProps {
11
11
  label: string;
12
12
  setLabel: React.Dispatch<React.SetStateAction<string>>;
13
13
  trackColor?: string;
14
+ bufferColor?: string;
15
+ hoverColor?: string;
16
+ trackBackgroundColor?: string;
14
17
  }
15
18
  export declare const TimeCodes: React.FC<TimeCodesProps>;
@@ -1 +1 @@
1
- export declare const useVideoSource: (trackSrc: string, type?: "hls" | "dash" | "mp4" | "other" | "youtube" | undefined) => void;
1
+ export declare const useVideoSource: (trackSrc: string, type?: "hls" | "dash" | "mp4" | "other" | "youtube" | undefined, isLive?: boolean) => void;
@@ -18,17 +18,33 @@ export interface VideoProps {
18
18
  showControls?: boolean;
19
19
  isMute?: boolean;
20
20
  startFrom?: number;
21
+ isLive?: boolean;
21
22
  }
22
23
  export interface VideoQualityConfig {
23
24
  defaultQuality?: "auto" | string;
24
25
  showInSettings?: boolean;
25
26
  }
27
+ export interface SeekBarConfig {
28
+ trackColor?: string;
29
+ bufferColor?: string;
30
+ hoverColor?: string;
31
+ thumbColor?: string;
32
+ trackBackgroundColor?: string;
33
+ }
34
+ export interface PlayPauseButtonConfig {
35
+ backgroundColor?: string;
36
+ hoverBackgroundColor?: string;
37
+ borderRadius?: string;
38
+ padding?: string;
39
+ }
26
40
  export interface StyleProps {
27
41
  className?: string;
28
42
  width?: string;
29
43
  height?: string;
30
44
  subtitleStyle?: SubtitleStyleConfig;
31
45
  qualityConfig?: VideoQualityConfig;
46
+ seekBarConfig?: SeekBarConfig;
47
+ playPauseButtonConfig?: PlayPauseButtonConfig;
32
48
  }
33
49
  export interface EventProps {
34
50
  onEnded?: (e: React.SyntheticEvent<HTMLVideoElement>) => void;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface LiveIndicatorProps {
3
+ className?: string;
4
+ }
5
+ /**
6
+ * Clean LIVE indicator with blinking dot animation for live streams.
7
+ */
8
+ declare const LiveIndicator: React.FC<LiveIndicatorProps>;
9
+ export default LiveIndicator;
package/dist/index.d.ts CHANGED
@@ -3,5 +3,5 @@ export { default as VideoPlayer } from "./VideoPlayer/VideoPlayer";
3
3
  export { useVideoStore } from "./store/VideoState";
4
4
  export type { VideoPlayerProps, Episode, SubtitleTrack, IntroConfig, NextEpisodeConfig, WatchHistoryData, } from "./VideoPlayer/types/VideoPlayerTypes";
5
5
  export type { SubtitleStyleConfig } from "./VideoPlayer/hooks/useSubtitleStyling";
6
- export type { VideoQualityConfig } from "./VideoPlayer/types/VideoPlayerTypes";
6
+ export type { VideoQualityConfig, SeekBarConfig, PlayPauseButtonConfig, } from "./VideoPlayer/types/VideoPlayerTypes";
7
7
  export type { VideoState, VideoRefsState, VideoPlaybackState, VideoTimingState, VideoControlsState, VideoQualityState, SubtitlesState, EpisodesState, IntroState, } from "./store/types/StoreTypes";