@zezosoft/react-player 0.0.9 → 0.0.10
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 +536 -146
- package/dist/VideoPlayer/components/ErrorOverlay.d.ts +8 -0
- package/dist/VideoPlayer/hooks/index.d.ts +2 -0
- package/dist/VideoPlayer/hooks/useNetworkSpeed.d.ts +7 -0
- package/dist/VideoPlayer/hooks/useVideoError.d.ts +7 -0
- package/dist/VideoPlayer/hooks/useVideoTracking.d.ts +2 -2
- package/dist/VideoPlayer/types/AdTypes.d.ts +0 -3
- package/dist/VideoPlayer/types/VideoPlayerTypes.d.ts +31 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +851 -296
- package/dist/store/slices/errorSlice.d.ts +5 -0
- package/dist/store/slices/index.d.ts +1 -0
- package/dist/store/types/StoreTypes.d.ts +11 -1
- package/package.json +6 -6
|
@@ -7,4 +7,5 @@ export { createSubtitlesSlice } from "./subtitlesSlice";
|
|
|
7
7
|
export { createEpisodesSlice } from "./episodesSlice";
|
|
8
8
|
export { createIntroSlice } from "./introSlice";
|
|
9
9
|
export { createAdsSlice } from "./adsSlice";
|
|
10
|
+
export { createErrorSlice } from "./errorSlice";
|
|
10
11
|
export { createResetSlice } from "./resetSlice";
|
|
@@ -93,6 +93,16 @@ export interface IntroState {
|
|
|
93
93
|
export interface StoreResetState {
|
|
94
94
|
resetStore: () => void;
|
|
95
95
|
}
|
|
96
|
+
export interface VideoError {
|
|
97
|
+
code: number;
|
|
98
|
+
message: string;
|
|
99
|
+
type: "network" | "decode" | "src" | "unknown";
|
|
100
|
+
}
|
|
101
|
+
export interface VideoErrorState {
|
|
102
|
+
error: VideoError | null;
|
|
103
|
+
setError: (error: VideoError | null) => void;
|
|
104
|
+
clearError: () => void;
|
|
105
|
+
}
|
|
96
106
|
export interface AdsState {
|
|
97
107
|
isAdPlaying: boolean;
|
|
98
108
|
setIsAdPlaying: (isAdPlaying: boolean) => void;
|
|
@@ -113,5 +123,5 @@ export interface AdsState {
|
|
|
113
123
|
adVideoRef: HTMLVideoElement | null;
|
|
114
124
|
setAdVideoRef: (ref: HTMLVideoElement | null) => void;
|
|
115
125
|
}
|
|
116
|
-
export interface VideoState extends VideoRefsState, VideoPlaybackState, VideoTimingState, VideoControlsState, VideoQualityState, SubtitlesState, EpisodesState, IntroState, AdsState, StoreResetState {
|
|
126
|
+
export interface VideoState extends VideoRefsState, VideoPlaybackState, VideoTimingState, VideoControlsState, VideoQualityState, SubtitlesState, EpisodesState, IntroState, AdsState, VideoErrorState, StoreResetState {
|
|
117
127
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zezosoft/react-player",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
38
38
|
"@tailwindcss/postcss": "^4.0.14",
|
|
39
39
|
"@types/node": "^24.4.0",
|
|
40
|
-
"@types/react": "^19.
|
|
40
|
+
"@types/react": "^19.2.7",
|
|
41
41
|
"hls.js": "^1.5.20",
|
|
42
42
|
"lucide-react": "^0.481.0",
|
|
43
43
|
"postcss": "^8.5.3",
|
|
44
|
-
"react": "^19.
|
|
45
|
-
"react-dom": "^19.
|
|
44
|
+
"react": "^19.2.3",
|
|
45
|
+
"react-dom": "^19.2.3",
|
|
46
46
|
"rollup": "^4.35.0",
|
|
47
47
|
"rollup-plugin-postcss": "^4.0.2",
|
|
48
48
|
"tailwindcss": "^4.0.14",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"hls.js": "^1.5.20",
|
|
54
54
|
"lucide-react": "^0.481.0",
|
|
55
|
-
"react": "^19.
|
|
56
|
-
"react-dom": "^19.
|
|
55
|
+
"react": "^19.2.3",
|
|
56
|
+
"react-dom": "^19.2.3",
|
|
57
57
|
"zustand": "^5.0.3"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|