@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.
@@ -0,0 +1,5 @@
1
+ import { StateCreator } from "zustand";
2
+ import { VideoErrorState, VideoState } from "../types/StoreTypes";
3
+ export declare const createErrorSlice: StateCreator<VideoState, [
4
+ ], [
5
+ ], VideoErrorState>;
@@ -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.9",
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.0.10",
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.0.0",
45
- "react-dom": "^19.0.0",
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.0.0",
56
- "react-dom": "^19.0.0",
55
+ "react": "^19.2.3",
56
+ "react-dom": "^19.2.3",
57
57
  "zustand": "^5.0.3"
58
58
  },
59
59
  "dependencies": {