@zezosoft/zezo-ott-react-native-video-player 1.0.0
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/LICENSE +21 -0
- package/README.md +308 -0
- package/lib/module/VideoPlayer/MediaControls/BottomControls.js +156 -0
- package/lib/module/VideoPlayer/MediaControls/BottomControls.js.map +1 -0
- package/lib/module/VideoPlayer/MediaControls/MediaControls.js +27 -0
- package/lib/module/VideoPlayer/MediaControls/MediaControls.js.map +1 -0
- package/lib/module/VideoPlayer/MediaControls/MediaControlsProvider.js +85 -0
- package/lib/module/VideoPlayer/MediaControls/MediaControlsProvider.js.map +1 -0
- package/lib/module/VideoPlayer/MediaControls/MiddleControls.js +208 -0
- package/lib/module/VideoPlayer/MediaControls/MiddleControls.js.map +1 -0
- package/lib/module/VideoPlayer/MediaControls/TopControls.js +94 -0
- package/lib/module/VideoPlayer/MediaControls/TopControls.js.map +1 -0
- package/lib/module/VideoPlayer/Styles/fonts.js +58 -0
- package/lib/module/VideoPlayer/Styles/fonts.js.map +1 -0
- package/lib/module/VideoPlayer/Styles/globalStyles.js +75 -0
- package/lib/module/VideoPlayer/Styles/globalStyles.js.map +1 -0
- package/lib/module/VideoPlayer/VideoPlayer.js +180 -0
- package/lib/module/VideoPlayer/VideoPlayer.js.map +1 -0
- package/lib/module/VideoPlayer/components/ProgressBar.js +84 -0
- package/lib/module/VideoPlayer/components/ProgressBar.js.map +1 -0
- package/lib/module/VideoPlayer/components/SkipAndNextControls.js +154 -0
- package/lib/module/VideoPlayer/components/SkipAndNextControls.js.map +1 -0
- package/lib/module/VideoPlayer/components/SubtitleView.js +57 -0
- package/lib/module/VideoPlayer/components/SubtitleView.js.map +1 -0
- package/lib/module/VideoPlayer/context/VideoPlayerConfig.js +47 -0
- package/lib/module/VideoPlayer/context/VideoPlayerConfig.js.map +1 -0
- package/lib/module/VideoPlayer/context/index.js +4 -0
- package/lib/module/VideoPlayer/context/index.js.map +1 -0
- package/lib/module/VideoPlayer/index.js +7 -0
- package/lib/module/VideoPlayer/index.js.map +1 -0
- package/lib/module/VideoPlayer/model/AudioAndSubtitles.js +257 -0
- package/lib/module/VideoPlayer/model/AudioAndSubtitles.js.map +1 -0
- package/lib/module/VideoPlayer/model/Episodes.js +272 -0
- package/lib/module/VideoPlayer/model/Episodes.js.map +1 -0
- package/lib/module/VideoPlayer/model/SettingModal.js +115 -0
- package/lib/module/VideoPlayer/model/SettingModal.js.map +1 -0
- package/lib/module/VideoPlayer/model/SpeedControls.js +140 -0
- package/lib/module/VideoPlayer/model/SpeedControls.js.map +1 -0
- package/lib/module/VideoPlayer/model/VideoPlayerSettings.js +113 -0
- package/lib/module/VideoPlayer/model/VideoPlayerSettings.js.map +1 -0
- package/lib/module/VideoPlayer/store/index.js +5 -0
- package/lib/module/VideoPlayer/store/index.js.map +1 -0
- package/lib/module/VideoPlayer/store/videoPlayer.type.js +4 -0
- package/lib/module/VideoPlayer/store/videoPlayer.type.js.map +1 -0
- package/lib/module/VideoPlayer/store/videoPlayerStore.js +147 -0
- package/lib/module/VideoPlayer/store/videoPlayerStore.js.map +1 -0
- package/lib/module/VideoPlayer/utils/Display.js +22 -0
- package/lib/module/VideoPlayer/utils/Display.js.map +1 -0
- package/lib/module/VideoPlayer/utils/PlatformSelector.js +18 -0
- package/lib/module/VideoPlayer/utils/PlatformSelector.js.map +1 -0
- package/lib/module/VideoPlayer/utils/hooks/index.js +5 -0
- package/lib/module/VideoPlayer/utils/hooks/index.js.map +1 -0
- package/lib/module/VideoPlayer/utils/hooks/useVideoPlayerBack.js +48 -0
- package/lib/module/VideoPlayer/utils/hooks/useVideoPlayerBack.js.map +1 -0
- package/lib/module/VideoPlayer/utils/hooks/useVideoResolutions.js +88 -0
- package/lib/module/VideoPlayer/utils/hooks/useVideoResolutions.js.map +1 -0
- package/lib/module/VideoPlayer/utils/index.js +10 -0
- package/lib/module/VideoPlayer/utils/index.js.map +1 -0
- package/lib/module/VideoPlayer/utils/lockOrientation.js +31 -0
- package/lib/module/VideoPlayer/utils/lockOrientation.js.map +1 -0
- package/lib/module/VideoPlayer/utils/playerEvents.js +79 -0
- package/lib/module/VideoPlayer/utils/playerEvents.js.map +1 -0
- package/lib/module/VideoPlayer/utils/timeFormatter.js +35 -0
- package/lib/module/VideoPlayer/utils/timeFormatter.js.map +1 -0
- package/lib/module/VideoPlayer/utils/useWatchReporter.js +68 -0
- package/lib/module/VideoPlayer/utils/useWatchReporter.js.map +1 -0
- package/lib/module/VideoPlayer/utils/videoControl.js +166 -0
- package/lib/module/VideoPlayer/utils/videoControl.js.map +1 -0
- package/lib/module/VideoPlayer/utils/videoRef.js +5 -0
- package/lib/module/VideoPlayer/utils/videoRef.js.map +1 -0
- package/lib/module/VideoPlayer/utils/videoSource.js +17 -0
- package/lib/module/VideoPlayer/utils/videoSource.js.map +1 -0
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/VideoPlayer/MediaControls/BottomControls.d.ts +3 -0
- package/lib/typescript/src/VideoPlayer/MediaControls/BottomControls.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/MediaControls/MediaControls.d.ts +6 -0
- package/lib/typescript/src/VideoPlayer/MediaControls/MediaControls.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/MediaControls/MediaControlsProvider.d.ts +14 -0
- package/lib/typescript/src/VideoPlayer/MediaControls/MediaControlsProvider.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/MediaControls/MiddleControls.d.ts +3 -0
- package/lib/typescript/src/VideoPlayer/MediaControls/MiddleControls.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/MediaControls/TopControls.d.ts +7 -0
- package/lib/typescript/src/VideoPlayer/MediaControls/TopControls.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/Styles/fonts.d.ts +54 -0
- package/lib/typescript/src/VideoPlayer/Styles/fonts.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/Styles/globalStyles.d.ts +70 -0
- package/lib/typescript/src/VideoPlayer/Styles/globalStyles.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/VideoPlayer.d.ts +22 -0
- package/lib/typescript/src/VideoPlayer/VideoPlayer.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/components/ProgressBar.d.ts +12 -0
- package/lib/typescript/src/VideoPlayer/components/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/components/SkipAndNextControls.d.ts +12 -0
- package/lib/typescript/src/VideoPlayer/components/SkipAndNextControls.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/components/SubtitleView.d.ts +3 -0
- package/lib/typescript/src/VideoPlayer/components/SubtitleView.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/context/VideoPlayerConfig.d.ts +25 -0
- package/lib/typescript/src/VideoPlayer/context/VideoPlayerConfig.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/context/index.d.ts +3 -0
- package/lib/typescript/src/VideoPlayer/context/index.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/index.d.ts +5 -0
- package/lib/typescript/src/VideoPlayer/index.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/model/AudioAndSubtitles.d.ts +4 -0
- package/lib/typescript/src/VideoPlayer/model/AudioAndSubtitles.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/model/Episodes.d.ts +12 -0
- package/lib/typescript/src/VideoPlayer/model/Episodes.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/model/SettingModal.d.ts +12 -0
- package/lib/typescript/src/VideoPlayer/model/SettingModal.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/model/SpeedControls.d.ts +4 -0
- package/lib/typescript/src/VideoPlayer/model/SpeedControls.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/model/VideoPlayerSettings.d.ts +7 -0
- package/lib/typescript/src/VideoPlayer/model/VideoPlayerSettings.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/store/index.d.ts +3 -0
- package/lib/typescript/src/VideoPlayer/store/index.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/store/videoPlayer.type.d.ts +144 -0
- package/lib/typescript/src/VideoPlayer/store/videoPlayer.type.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/store/videoPlayerStore.d.ts +20 -0
- package/lib/typescript/src/VideoPlayer/store/videoPlayerStore.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/Display.d.ts +8 -0
- package/lib/typescript/src/VideoPlayer/utils/Display.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/PlatformSelector.d.ts +11 -0
- package/lib/typescript/src/VideoPlayer/utils/PlatformSelector.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/hooks/index.d.ts +3 -0
- package/lib/typescript/src/VideoPlayer/utils/hooks/index.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/hooks/useVideoPlayerBack.d.ts +6 -0
- package/lib/typescript/src/VideoPlayer/utils/hooks/useVideoPlayerBack.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/hooks/useVideoResolutions.d.ts +12 -0
- package/lib/typescript/src/VideoPlayer/utils/hooks/useVideoResolutions.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/index.d.ts +8 -0
- package/lib/typescript/src/VideoPlayer/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/lockOrientation.d.ts +3 -0
- package/lib/typescript/src/VideoPlayer/utils/lockOrientation.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/playerEvents.d.ts +18 -0
- package/lib/typescript/src/VideoPlayer/utils/playerEvents.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/timeFormatter.d.ts +9 -0
- package/lib/typescript/src/VideoPlayer/utils/timeFormatter.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/useWatchReporter.d.ts +26 -0
- package/lib/typescript/src/VideoPlayer/utils/useWatchReporter.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/videoControl.d.ts +17 -0
- package/lib/typescript/src/VideoPlayer/utils/videoControl.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/videoRef.d.ts +3 -0
- package/lib/typescript/src/VideoPlayer/utils/videoRef.d.ts.map +1 -0
- package/lib/typescript/src/VideoPlayer/utils/videoSource.d.ts +10 -0
- package/lib/typescript/src/VideoPlayer/utils/videoSource.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +191 -0
- package/src/VideoPlayer/MediaControls/BottomControls.tsx +185 -0
- package/src/VideoPlayer/MediaControls/MediaControls.tsx +29 -0
- package/src/VideoPlayer/MediaControls/MediaControlsProvider.tsx +99 -0
- package/src/VideoPlayer/MediaControls/MiddleControls.tsx +232 -0
- package/src/VideoPlayer/MediaControls/TopControls.tsx +92 -0
- package/src/VideoPlayer/Styles/fonts.ts +106 -0
- package/src/VideoPlayer/Styles/globalStyles.ts +74 -0
- package/src/VideoPlayer/VideoPlayer.tsx +217 -0
- package/src/VideoPlayer/components/ProgressBar.tsx +98 -0
- package/src/VideoPlayer/components/SkipAndNextControls.tsx +195 -0
- package/src/VideoPlayer/components/SubtitleView.tsx +53 -0
- package/src/VideoPlayer/context/VideoPlayerConfig.tsx +65 -0
- package/src/VideoPlayer/context/index.ts +5 -0
- package/src/VideoPlayer/index.ts +4 -0
- package/src/VideoPlayer/model/AudioAndSubtitles.tsx +302 -0
- package/src/VideoPlayer/model/Episodes.tsx +294 -0
- package/src/VideoPlayer/model/SettingModal.tsx +128 -0
- package/src/VideoPlayer/model/SpeedControls.tsx +134 -0
- package/src/VideoPlayer/model/VideoPlayerSettings.tsx +141 -0
- package/src/VideoPlayer/store/index.ts +2 -0
- package/src/VideoPlayer/store/videoPlayer.type.ts +192 -0
- package/src/VideoPlayer/store/videoPlayerStore.ts +101 -0
- package/src/VideoPlayer/utils/Display.ts +14 -0
- package/src/VideoPlayer/utils/PlatformSelector.ts +18 -0
- package/src/VideoPlayer/utils/hooks/index.ts +2 -0
- package/src/VideoPlayer/utils/hooks/useVideoPlayerBack.ts +66 -0
- package/src/VideoPlayer/utils/hooks/useVideoResolutions.ts +119 -0
- package/src/VideoPlayer/utils/index.ts +7 -0
- package/src/VideoPlayer/utils/lockOrientation.ts +34 -0
- package/src/VideoPlayer/utils/playerEvents.ts +97 -0
- package/src/VideoPlayer/utils/timeFormatter.ts +47 -0
- package/src/VideoPlayer/utils/useWatchReporter.ts +104 -0
- package/src/VideoPlayer/utils/videoControl.ts +192 -0
- package/src/VideoPlayer/utils/videoRef.ts +4 -0
- package/src/VideoPlayer/utils/videoSource.ts +23 -0
- package/src/index.tsx +1 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh
|
|
3
|
+
* @lastModified Sat 16 Aug 2025 at 12:15 PM
|
|
4
|
+
*/
|
|
5
|
+
import { type EnumValues, type OnLoadData, ResizeMode, SelectedVideoTrackType } from 'react-native-video';
|
|
6
|
+
export interface BaseEntity {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
contentId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TimeRange {
|
|
12
|
+
start: number;
|
|
13
|
+
end: number;
|
|
14
|
+
}
|
|
15
|
+
export interface SubtitleTrack {
|
|
16
|
+
title?: string;
|
|
17
|
+
language?: string;
|
|
18
|
+
type: 'application/x-subrip' | 'application/ttml+xml' | 'text/vtt' | 'application/octet-stream';
|
|
19
|
+
url: string;
|
|
20
|
+
}
|
|
21
|
+
export interface MediaEpisode extends BaseEntity {
|
|
22
|
+
description: string;
|
|
23
|
+
duration: number;
|
|
24
|
+
sourceLink: string;
|
|
25
|
+
sourceType: 'HLS' | 'MP4';
|
|
26
|
+
subtitles: SubtitleTrack[];
|
|
27
|
+
thumbnail: string;
|
|
28
|
+
episodeNumber: number;
|
|
29
|
+
skipIntro?: TimeRange | null;
|
|
30
|
+
nextEpisodeAt?: number | null;
|
|
31
|
+
publishDate?: string | null;
|
|
32
|
+
}
|
|
33
|
+
export interface MediaSeason extends BaseEntity {
|
|
34
|
+
order: number;
|
|
35
|
+
seasonNumber?: number;
|
|
36
|
+
episodes: MediaEpisode[] | null;
|
|
37
|
+
isActive: boolean;
|
|
38
|
+
createdBy: string;
|
|
39
|
+
}
|
|
40
|
+
export interface MediaTrack extends BaseEntity {
|
|
41
|
+
description: string;
|
|
42
|
+
duration: number;
|
|
43
|
+
thumbnail: string;
|
|
44
|
+
type: 'movie' | 'series' | 'live_stream';
|
|
45
|
+
isTrailer?: boolean;
|
|
46
|
+
sourceType: 'HLS' | 'MP4';
|
|
47
|
+
sourceLink: string;
|
|
48
|
+
trailerSource?: string | null;
|
|
49
|
+
episodeId?: string | null;
|
|
50
|
+
episodeName?: string | null;
|
|
51
|
+
episodeNumber?: number | null;
|
|
52
|
+
seasonId?: string | null;
|
|
53
|
+
seasonNumber?: number | null;
|
|
54
|
+
skipIntro?: TimeRange | null;
|
|
55
|
+
nextEpisodeAt?: number | null;
|
|
56
|
+
subtitles?: SubtitleTrack[] | null;
|
|
57
|
+
publishDate?: string | null;
|
|
58
|
+
}
|
|
59
|
+
export interface TrackSelection {
|
|
60
|
+
index?: number;
|
|
61
|
+
type: string;
|
|
62
|
+
value: string | number;
|
|
63
|
+
isExternal: boolean;
|
|
64
|
+
title?: string;
|
|
65
|
+
uri?: string;
|
|
66
|
+
language?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface IosTrackResolution {
|
|
69
|
+
width: number | string | null;
|
|
70
|
+
height: number | string | null;
|
|
71
|
+
bandwidth: number;
|
|
72
|
+
}
|
|
73
|
+
export type SettingsAction = 'playbackRate' | 'audioOrSubtitle' | 'settings' | 'episodes' | 'speed' | 'none';
|
|
74
|
+
type StateSetter<T> = (value: T) => void;
|
|
75
|
+
export interface VideoPlayerStore {
|
|
76
|
+
currentTime: number;
|
|
77
|
+
setCurrentTime: StateSetter<number>;
|
|
78
|
+
duration: number;
|
|
79
|
+
setDuration: StateSetter<number>;
|
|
80
|
+
isPaused: boolean;
|
|
81
|
+
setIsPaused: StateSetter<boolean>;
|
|
82
|
+
isBuffering: boolean;
|
|
83
|
+
setIsBuffering: StateSetter<boolean>;
|
|
84
|
+
resizeMode: EnumValues<ResizeMode>;
|
|
85
|
+
setResizeMode: StateSetter<EnumValues<ResizeMode>>;
|
|
86
|
+
playableDuration: number;
|
|
87
|
+
setPlayableDuration: StateSetter<number>;
|
|
88
|
+
onLoad: OnLoadData | null;
|
|
89
|
+
setOnLoad: StateSetter<OnLoadData>;
|
|
90
|
+
error: string | null;
|
|
91
|
+
setError: StateSetter<string | null>;
|
|
92
|
+
playBackRate: number;
|
|
93
|
+
playBackRateLabel: string | null;
|
|
94
|
+
setPlayBackRate: (rate: number, label: string) => void;
|
|
95
|
+
controlsVisible: boolean;
|
|
96
|
+
setControlsVisible: StateSetter<boolean>;
|
|
97
|
+
controlsTimer: number;
|
|
98
|
+
setControlsTimer: StateSetter<number>;
|
|
99
|
+
selectedAudioTrack: TrackSelection | null;
|
|
100
|
+
setSelectedAudioTrack: StateSetter<TrackSelection | null>;
|
|
101
|
+
selectedSubtitleTrack: TrackSelection | null;
|
|
102
|
+
setSelectedSubtitleTrack: StateSetter<TrackSelection | null>;
|
|
103
|
+
selectedVideoTrack: {
|
|
104
|
+
type: SelectedVideoTrackType;
|
|
105
|
+
value: number;
|
|
106
|
+
} | null;
|
|
107
|
+
setSelectedVideoTrack: StateSetter<{
|
|
108
|
+
type: SelectedVideoTrackType;
|
|
109
|
+
value: number;
|
|
110
|
+
} | null>;
|
|
111
|
+
activeSubtitle: SubtitleTrack | null;
|
|
112
|
+
setActiveSubtitle: StateSetter<SubtitleTrack | null>;
|
|
113
|
+
activeTrack: MediaTrack | null;
|
|
114
|
+
setActiveTrack: StateSetter<MediaTrack | null>;
|
|
115
|
+
playList: MediaTrack[];
|
|
116
|
+
setPlayList: StateSetter<MediaTrack[]>;
|
|
117
|
+
currentTrackIndex: number;
|
|
118
|
+
setCurrentTrackIndex: StateSetter<number>;
|
|
119
|
+
contentSeasons: MediaSeason[] | null;
|
|
120
|
+
setContentSeasons: StateSetter<MediaSeason[] | null>;
|
|
121
|
+
activeSeason: MediaSeason | null;
|
|
122
|
+
setActiveSeason: StateSetter<MediaSeason | null>;
|
|
123
|
+
settingsModal: {
|
|
124
|
+
isVisible: boolean;
|
|
125
|
+
action: SettingsAction;
|
|
126
|
+
};
|
|
127
|
+
setSettingsModal: StateSetter<{
|
|
128
|
+
isVisible: boolean;
|
|
129
|
+
action: SettingsAction;
|
|
130
|
+
}>;
|
|
131
|
+
maxBitRate: number | null;
|
|
132
|
+
setMaxBitRate: StateSetter<number | null>;
|
|
133
|
+
startWatchTime: number | null;
|
|
134
|
+
setStartWatchTime: StateSetter<number | null>;
|
|
135
|
+
isViewCounted: boolean;
|
|
136
|
+
setIsViewCounted: StateSetter<boolean>;
|
|
137
|
+
isSkipIntroVisible: boolean;
|
|
138
|
+
setIsSkipIntroVisible: StateSetter<boolean>;
|
|
139
|
+
isNextEpisodeVisible: boolean;
|
|
140
|
+
setIsNextEpisodeVisible: StateSetter<boolean>;
|
|
141
|
+
resetStore: () => void;
|
|
142
|
+
}
|
|
143
|
+
export {};
|
|
144
|
+
//# sourceMappingURL=videoPlayer.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoPlayer.type.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/store/videoPlayer.type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,UAAU,EACV,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EA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AAC,CAAC;IAE9C,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAEvC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAE5C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,uBAAuB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAE9C,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MMKV } from 'react-native-mmkv';
|
|
2
|
+
import type { VideoPlayerStore } from './videoPlayer.type';
|
|
3
|
+
export declare const storage: MMKV;
|
|
4
|
+
export declare const mmkvStorage: {
|
|
5
|
+
setItem: (key: string, value: string) => void;
|
|
6
|
+
getItem: (key: string) => string | null;
|
|
7
|
+
removeItem: (key: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const useVideoPlayerStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<VideoPlayerStore>, "persist"> & {
|
|
10
|
+
persist: {
|
|
11
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<VideoPlayerStore, unknown>>) => void;
|
|
12
|
+
clearStorage: () => void;
|
|
13
|
+
rehydrate: () => Promise<void> | void;
|
|
14
|
+
hasHydrated: () => boolean;
|
|
15
|
+
onHydrate: (fn: (state: VideoPlayerStore) => void) => () => void;
|
|
16
|
+
onFinishHydration: (fn: (state: VideoPlayerStore) => void) => () => void;
|
|
17
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<VideoPlayerStore, unknown>>;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=videoPlayerStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoPlayerStore.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/store/videoPlayerStore.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,KAAK,EAAkB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,eAAO,MAAM,OAAO,MAGlB,CAAC;AAEH,eAAO,MAAM,WAAW;mBACP,MAAM,SAAS,MAAM;mBACrB,MAAM;sBACH,MAAM;CACzB,CAAC;AAgCF,eAAO,MAAM,mBAAmB;;;;;;;;;;EAiD/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Display.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/Display.ts"],"names":[],"mappings":";mBAQsB,MAAM;kBACP,MAAM;;;;AAI3B,wBAA8D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Fri 08 Aug 2025 at 08:44 PM
|
|
4
|
+
*/
|
|
5
|
+
declare class PlatformSelector {
|
|
6
|
+
isAndroid(): boolean;
|
|
7
|
+
isIOS(): boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: PlatformSelector;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=PlatformSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlatformSelector.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/PlatformSelector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,cAAM,gBAAgB;IACb,SAAS,IAAI,OAAO;IAIpB,KAAK,IAAI,OAAO;CAGxB;;AAED,wBAAsC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVideoPlayerBack.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/hooks/useVideoPlayerBack.ts"],"names":[],"mappings":"AAUA,KAAK,uBAAuB,GAAG;IAC7B,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,kBAEhC,uBAA4B,eAiD9B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MediaTrack } from '../../store/videoPlayer.type';
|
|
2
|
+
export interface StreamInfo {
|
|
3
|
+
bandwidth: number;
|
|
4
|
+
width: number | string;
|
|
5
|
+
height: number | string;
|
|
6
|
+
}
|
|
7
|
+
export interface Resolution {
|
|
8
|
+
height: number | 'auto';
|
|
9
|
+
bandwidth: number | null;
|
|
10
|
+
}
|
|
11
|
+
export declare const useVideoResolutions: (track: MediaTrack | null) => Resolution[];
|
|
12
|
+
//# sourceMappingURL=useVideoResolutions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVideoResolutions.d.ts","sourceRoot":"","sources":["../../../../../../src/VideoPlayer/utils/hooks/useVideoResolutions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AA0DD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAKD,eAAO,MAAM,mBAAmB,GAAI,OAAO,UAAU,GAAG,IAAI,iBA4C3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lockOrientation.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/lockOrientation.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc,YAa1B,CAAC;AAEF,eAAO,MAAM,eAAe,YAa3B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { OnBufferData, OnLoadData, OnLoadStartData, OnProgressData } from 'react-native-video';
|
|
2
|
+
import type { MediaEpisode } from '../store/videoPlayer.type';
|
|
3
|
+
import type { ExtendedWatchProgress } from './useWatchReporter';
|
|
4
|
+
export declare const createPlayerEvents: () => {
|
|
5
|
+
onProgress: ({ currentTime, playableDuration, }: OnProgressData) => void;
|
|
6
|
+
onLoad: (data: OnLoadData) => void;
|
|
7
|
+
onBuffer: ({ isBuffering }: OnBufferData) => void;
|
|
8
|
+
onEnd: ({ onPressEpisode, reportProgress, autoNext, }: {
|
|
9
|
+
reportProgress: (event: ExtendedWatchProgress["event"]) => void;
|
|
10
|
+
onPressEpisode: ({ episode, }: {
|
|
11
|
+
episode: MediaEpisode;
|
|
12
|
+
}) => Promise<boolean>;
|
|
13
|
+
autoNext: boolean;
|
|
14
|
+
}) => void;
|
|
15
|
+
onLoadStart: (_: OnLoadStartData) => void;
|
|
16
|
+
LeaveVideoPlayer: () => void;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=playerEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playerEvents.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/playerEvents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,cAAc,EACf,MAAM,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,eAAO,MAAM,kBAAkB;qDAI1B,cAAc;mBAcK,UAAU;gCAeG,YAAY;2DAU5C;QACD,cAAc,EAAE,CAAC,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;QAChE,cAAc,EAAE,CAAC,EACf,OAAO,GACR,EAAE;YACD,OAAO,EAAE,YAAY,CAAC;SACvB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,QAAQ,EAAE,OAAO,CAAC;KACnB;qBAUuB,eAAe;;CAuBxC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Naresh Dhamu
|
|
3
|
+
* @lastModified Sat 16 Aug 2025 at 10:32 PM
|
|
4
|
+
* @description: Utility functions for formatting time
|
|
5
|
+
*/
|
|
6
|
+
export declare const formatDuration: (totalSeconds: number, hideSeconds?: boolean, addSpaces?: boolean) => string;
|
|
7
|
+
export declare const formatTime: (seconds: number) => string;
|
|
8
|
+
export declare const formatTimeWithMs: (seconds: number) => string;
|
|
9
|
+
//# sourceMappingURL=timeFormatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeFormatter.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/timeFormatter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,cAAc,GACzB,cAAc,MAAM,EACpB,qBAAmB,EACnB,mBAAiB,KAChB,MAgBF,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,WAQzC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,KAAG,MAQlD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { MediaTrack } from '../store/videoPlayer.type';
|
|
2
|
+
export type WatchEventType = 'VIEW_COUNT' | 'COMPLETED' | 'PROGRESS' | 'EPISODE_CHANGE' | 'VIDEO_CLOSE';
|
|
3
|
+
export interface WatchProgressDetails {
|
|
4
|
+
contentId: string | null;
|
|
5
|
+
episodeId?: string | null;
|
|
6
|
+
contentType?: MediaTrack['type'];
|
|
7
|
+
currentTime: number;
|
|
8
|
+
totalWatchTime: number;
|
|
9
|
+
duration: number;
|
|
10
|
+
isVideoCompleted: boolean;
|
|
11
|
+
activeTrack: MediaTrack | null;
|
|
12
|
+
}
|
|
13
|
+
export interface ExtendedWatchProgress extends WatchProgressDetails {
|
|
14
|
+
event?: WatchEventType;
|
|
15
|
+
}
|
|
16
|
+
export declare const countWatchTime: (forceFlush?: boolean) => {
|
|
17
|
+
totalWatchTime: number;
|
|
18
|
+
completed: boolean;
|
|
19
|
+
currentTime: number;
|
|
20
|
+
};
|
|
21
|
+
export declare const useWatchReporter: ({ onWatchProgress, }: {
|
|
22
|
+
onWatchProgress?: (progress: ExtendedWatchProgress) => void;
|
|
23
|
+
}) => {
|
|
24
|
+
reportProgress: (event?: WatchEventType, forcedCurrentTime?: number) => void;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=useWatchReporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWatchReporter.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/useWatchReporter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,WAAW,GACX,UAAU,GACV,gBAAgB,GAChB,aAAa,CAAC;AAElB,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,UAAU,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,GACzB,oBAAkB,KACjB;IACD,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CAqCrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,sBAE9B;IACD,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAC7D;6BAEW,cAAc,sBAAmC,MAAM;CA2BlE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MediaEpisode } from '../store/videoPlayer.type';
|
|
2
|
+
export declare const handlePause: () => void;
|
|
3
|
+
interface HandleNextOptions {
|
|
4
|
+
onPressEpisode: ({ episode }: {
|
|
5
|
+
episode: MediaEpisode;
|
|
6
|
+
}) => Promise<boolean>;
|
|
7
|
+
autoNext?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const handleNext: ({ onPressEpisode, autoNext, }: HandleNextOptions) => Promise<number | null>;
|
|
10
|
+
export declare const viewCount: () => boolean;
|
|
11
|
+
export declare const countWatchTime: () => {
|
|
12
|
+
totalWatchTime: number;
|
|
13
|
+
completed: boolean;
|
|
14
|
+
currentTime: number;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=videoControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoControl.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/videoControl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,eAAO,MAAM,WAAW,YAiBvB,CAAC;AAEF,UAAU,iBAAiB;IACzB,cAAc,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,YAAY,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,eAAO,MAAM,UAAU,GAAU,+BAG9B,iBAAiB,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CA2F3C,CAAC;AAEF,eAAO,MAAM,SAAS,QAAO,OAY5B,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CAoDrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoRef.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/videoRef.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,eAAO,MAAM,QAAQ,4CAAwB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MediaTrack } from '../store/videoPlayer.type';
|
|
2
|
+
import type { ReactVideoSource } from 'react-native-video';
|
|
3
|
+
interface UrlHandlerProps {
|
|
4
|
+
playList: MediaTrack[];
|
|
5
|
+
currentTrackIndex: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const getVideoSource: ({ playList, currentTrackIndex, }: UrlHandlerProps) => ReactVideoSource;
|
|
8
|
+
export declare const getEpisodeIndex: (playList: MediaTrack[], episodeId: string) => number;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=videoSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoSource.d.ts","sourceRoot":"","sources":["../../../../../src/VideoPlayer/utils/videoSource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,UAAU,eAAe;IACvB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,GAAI,kCAG5B,eAAe,KAAG,gBAMpB,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,UAAU,UAAU,EAAE,EACtB,WAAW,MAAM,KAChB,MAAoE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zezosoft/zezo-ott-react-native-video-player",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "React Native OTT Video Player for Android & iOS. Supports playlists, seasons, auto-next playback, subtitles, theming, analytics, fullscreen mode, and custom controls. 🚀 Powered by ZezoSoft.",
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.ts",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"ios",
|
|
20
|
+
"cpp",
|
|
21
|
+
"*.podspec",
|
|
22
|
+
"react-native.config.js",
|
|
23
|
+
"!ios/build",
|
|
24
|
+
"!android/build",
|
|
25
|
+
"!android/gradle",
|
|
26
|
+
"!android/gradlew",
|
|
27
|
+
"!android/gradlew.bat",
|
|
28
|
+
"!android/local.properties",
|
|
29
|
+
"!**/__tests__",
|
|
30
|
+
"!**/__fixtures__",
|
|
31
|
+
"!**/__mocks__",
|
|
32
|
+
"!**/.*"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"example": "yarn workspace @zezosoft/zezo-ott-react-native-video-player-example",
|
|
36
|
+
"test": "jest",
|
|
37
|
+
"typecheck": "tsc",
|
|
38
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
39
|
+
"clean": "del-cli lib",
|
|
40
|
+
"prepare": "bob build",
|
|
41
|
+
"release": "release-it --only-version",
|
|
42
|
+
"watch": "nodemon --watch src --ext ts,tsx,js --delay 500ms --exec \"yarn clean && yarn prepare && yalc push\""
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"react-native",
|
|
46
|
+
"ios",
|
|
47
|
+
"android",
|
|
48
|
+
"video-player",
|
|
49
|
+
"react-native-video",
|
|
50
|
+
"react-native-video-player",
|
|
51
|
+
"ott",
|
|
52
|
+
"ott-player",
|
|
53
|
+
"react-native-ott",
|
|
54
|
+
"playlist",
|
|
55
|
+
"season-navigation",
|
|
56
|
+
"fullscreen-video",
|
|
57
|
+
"custom-video-player",
|
|
58
|
+
"subtitles",
|
|
59
|
+
"analytics",
|
|
60
|
+
"auto-next",
|
|
61
|
+
"react-native-library",
|
|
62
|
+
"react-native-component"
|
|
63
|
+
],
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "git+https://github.com/Zezo-Soft/zezo-ott-react-native-video-player.git"
|
|
67
|
+
},
|
|
68
|
+
"author": "Naresh Dhamu <narsadhamu@gmail.com> (https://github.com/Naresh-Dhamu)",
|
|
69
|
+
"license": "MIT",
|
|
70
|
+
"bugs": {
|
|
71
|
+
"url": "https://github.com/Zezo-Soft/zezosoft-zezo-ott-react-native-video-player/issues"
|
|
72
|
+
},
|
|
73
|
+
"homepage": "https://github.com/Zezo-Soft/zezosoft-zezo-ott-react-native-video-player#readme",
|
|
74
|
+
"publishConfig": {
|
|
75
|
+
"registry": "https://registry.npmjs.org/"
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
79
|
+
"@eslint/compat": "^1.2.7",
|
|
80
|
+
"@eslint/eslintrc": "^3.3.0",
|
|
81
|
+
"@eslint/js": "^9.22.0",
|
|
82
|
+
"@evilmartians/lefthook": "^1.5.0",
|
|
83
|
+
"@react-native/babel-preset": "0.78.2",
|
|
84
|
+
"@react-native/eslint-config": "^0.78.0",
|
|
85
|
+
"@release-it/conventional-changelog": "^9.0.2",
|
|
86
|
+
"@types/jest": "^29.5.5",
|
|
87
|
+
"@types/react": "^19.0.12",
|
|
88
|
+
"commitlint": "^19.6.1",
|
|
89
|
+
"del-cli": "^5.1.0",
|
|
90
|
+
"eslint": "^9.22.0",
|
|
91
|
+
"eslint-config-prettier": "^10.1.1",
|
|
92
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
93
|
+
"jest": "^29.7.0",
|
|
94
|
+
"prettier": "^3.0.3",
|
|
95
|
+
"react": "19.0.0",
|
|
96
|
+
"react-native": "0.79.5",
|
|
97
|
+
"react-native-builder-bob": "^0.40.13",
|
|
98
|
+
"release-it": "^17.10.0",
|
|
99
|
+
"typescript": "^5.8.3"
|
|
100
|
+
},
|
|
101
|
+
"peerDependencies": {
|
|
102
|
+
"react": "*",
|
|
103
|
+
"react-native": "*"
|
|
104
|
+
},
|
|
105
|
+
"workspaces": [
|
|
106
|
+
"example"
|
|
107
|
+
],
|
|
108
|
+
"packageManager": "yarn@3.6.1",
|
|
109
|
+
"jest": {
|
|
110
|
+
"preset": "react-native",
|
|
111
|
+
"modulePathIgnorePatterns": [
|
|
112
|
+
"<rootDir>/example/node_modules",
|
|
113
|
+
"<rootDir>/lib/"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"commitlint": {
|
|
117
|
+
"extends": [
|
|
118
|
+
"@commitlint/config-conventional"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"release-it": {
|
|
122
|
+
"git": {
|
|
123
|
+
"commitMessage": "chore: release ${version}",
|
|
124
|
+
"tagName": "v${version}"
|
|
125
|
+
},
|
|
126
|
+
"npm": {
|
|
127
|
+
"publish": true
|
|
128
|
+
},
|
|
129
|
+
"github": {
|
|
130
|
+
"release": true
|
|
131
|
+
},
|
|
132
|
+
"plugins": {
|
|
133
|
+
"@release-it/conventional-changelog": {
|
|
134
|
+
"preset": {
|
|
135
|
+
"name": "angular"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"prettier": {
|
|
141
|
+
"quoteProps": "consistent",
|
|
142
|
+
"singleQuote": true,
|
|
143
|
+
"tabWidth": 2,
|
|
144
|
+
"trailingComma": "es5",
|
|
145
|
+
"useTabs": false
|
|
146
|
+
},
|
|
147
|
+
"react-native-builder-bob": {
|
|
148
|
+
"source": "src",
|
|
149
|
+
"output": "lib",
|
|
150
|
+
"targets": [
|
|
151
|
+
[
|
|
152
|
+
"module",
|
|
153
|
+
{
|
|
154
|
+
"esm": true
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
[
|
|
158
|
+
"typescript",
|
|
159
|
+
{
|
|
160
|
+
"project": "tsconfig.build.json"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"create-react-native-library": {
|
|
166
|
+
"languages": "js",
|
|
167
|
+
"type": "library",
|
|
168
|
+
"version": "0.52.0"
|
|
169
|
+
},
|
|
170
|
+
"dependencies": {
|
|
171
|
+
"@react-native-community/slider": "^4.5.7",
|
|
172
|
+
"axios": "^1.11.0",
|
|
173
|
+
"lucide-react-native": "^0.539.0",
|
|
174
|
+
"nodemon": "^3.1.10",
|
|
175
|
+
"react-native-awesome-slider": "^2.9.0",
|
|
176
|
+
"react-native-fast-image": "^8.6.3",
|
|
177
|
+
"react-native-gesture-handler": "^2.28.0",
|
|
178
|
+
"react-native-mmkv": "^3.3.0",
|
|
179
|
+
"react-native-orientation-locker": "1.6.0",
|
|
180
|
+
"react-native-popup-menu": "^0.18.0",
|
|
181
|
+
"react-native-reanimated": "~3.17.4",
|
|
182
|
+
"react-native-responsive-fontsize": "^0.5.1",
|
|
183
|
+
"react-native-safe-area-context": "^5.6.0",
|
|
184
|
+
"react-native-size-matters": "^0.4.2",
|
|
185
|
+
"react-native-subtitles": "^5.0.5",
|
|
186
|
+
"react-native-svg": "^15.12.1",
|
|
187
|
+
"react-native-system-navigation-bar": "^2.6.4",
|
|
188
|
+
"react-native-video": "^6.16.1",
|
|
189
|
+
"zustand": "^5.0.7"
|
|
190
|
+
}
|
|
191
|
+
}
|