@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.
- package/README.md +155 -514
- package/dist/VideoPlayer/components/controls/BottomControls.d.ts +4 -1
- package/dist/VideoPlayer/components/controls/MiddleControls.d.ts +7 -1
- package/dist/VideoPlayer/components/controls/VideoPlayerControls.d.ts +4 -1
- package/dist/VideoPlayer/components/time-line/TimeLine.d.ts +5 -0
- package/dist/VideoPlayer/components/time-line/components/HoverTimeWithPreview.d.ts +1 -0
- package/dist/VideoPlayer/components/time-line/components/TimeCodeItem.d.ts +3 -0
- package/dist/VideoPlayer/components/time-line/components/TimeCodes.d.ts +3 -0
- package/dist/VideoPlayer/hooks/useVideoSource.d.ts +1 -1
- package/dist/VideoPlayer/types/VideoPlayerTypes.d.ts +16 -0
- package/dist/components/ui/LiveIndicator.d.ts +9 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +124 -111
- package/dist/store/types/StoreTypes.d.ts +2 -0
- package/package.json +6 -7
- package/dist/VideoPlayer/MediaControls/BottomControls.d.ts +0 -5
- package/dist/VideoPlayer/MediaControls/ControlsHeader.d.ts +0 -5
- package/dist/VideoPlayer/MediaControls/MiddleControls.d.ts +0 -3
- package/dist/VideoPlayer/MediaControls/VideoPlayerControls.d.ts +0 -4
- package/dist/VideoPlayer/_components/BottomControls.d.ts +0 -5
- package/dist/VideoPlayer/_components/ControlsHeader.d.ts +0 -5
- package/dist/VideoPlayer/_components/MiddleControls.d.ts +0 -3
- package/dist/VideoPlayer/_components/Overlay.d.ts +0 -4
- package/dist/VideoPlayer/_components/SubtitleOverlay.d.ts +0 -7
- package/dist/VideoPlayer/_components/TimeLine/TimeLine.d.ts +0 -20
- package/dist/VideoPlayer/_components/TimeLine/_components/hoverTimeWithPreview.d.ts +0 -16
- package/dist/VideoPlayer/_components/TimeLine/_components/thumb.d.ts +0 -9
- package/dist/VideoPlayer/_components/TimeLine/_components/timeCodeItem.d.ts +0 -21
- package/dist/VideoPlayer/_components/TimeLine/_components/timeCodes.d.ts +0 -15
- package/dist/VideoPlayer/_components/TimeLine/utils/getEndTimeByIndex.d.ts +0 -2
- package/dist/VideoPlayer/_components/TimeLine/utils/getHoverTimePosition.d.ts +0 -3
- package/dist/VideoPlayer/_components/TimeLine/utils/getPositionPercent.d.ts +0 -1
- package/dist/VideoPlayer/_components/TimeLine/utils/getTimeScale.d.ts +0 -1
- package/dist/VideoPlayer/_components/TimeLine/utils/isInRange.d.ts +0 -1
- package/dist/VideoPlayer/_components/TimeLine/utils/positionToMs.d.ts +0 -1
- package/dist/VideoPlayer/_components/TimeLine/utils/secondsToTime.d.ts +0 -6
- package/dist/VideoPlayer/_components/TimeLine/utils/timeToTimeString.d.ts +0 -1
- package/dist/VideoPlayer/_components/VideoPlayerControls.d.ts +0 -4
- package/dist/VideoPlayer/hooks/useNetworkSpeed.d.ts +0 -7
- package/dist/components/ui/PiPictureInPictureToggle.d.ts +0 -8
- /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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
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";
|