@halibegic/react-video-player 0.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.
Files changed (33) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +55 -0
  3. package/dist/components/hooks/use-debounce.d.ts +2 -0
  4. package/dist/components/live-player.d.ts +6 -0
  5. package/dist/components/player/player-provider.d.ts +3 -0
  6. package/dist/components/player/player-tech.d.ts +7 -0
  7. package/dist/components/player/tech/player-dash-tech.d.ts +6 -0
  8. package/dist/components/player/tech/player-hls-tech.d.ts +6 -0
  9. package/dist/components/player/ui/player-fullscreen.d.ts +3 -0
  10. package/dist/components/player/ui/player-loading.d.ts +4 -0
  11. package/dist/components/ui/button.d.ts +12 -0
  12. package/dist/components/ui/slider.d.ts +4 -0
  13. package/dist/components/ui/spinner.d.ts +3 -0
  14. package/dist/components/vod-player.d.ts +6 -0
  15. package/dist/config/player.d.ts +5 -0
  16. package/dist/index-UZF7kuPZ.js +3642 -0
  17. package/dist/index-UZF7kuPZ.js.map +1 -0
  18. package/dist/index.d.ts +4 -0
  19. package/dist/player-dash-tech-DDeyebd7.js +50 -0
  20. package/dist/player-dash-tech-DDeyebd7.js.map +1 -0
  21. package/dist/player-hls-tech-a87iikPB.js +29 -0
  22. package/dist/player-hls-tech-a87iikPB.js.map +1 -0
  23. package/dist/react-video-player.es.js +6 -0
  24. package/dist/react-video-player.es.js.map +1 -0
  25. package/dist/react-video-player.umd.js +58 -0
  26. package/dist/react-video-player.umd.js.map +1 -0
  27. package/dist/stores/player-store.d.ts +75 -0
  28. package/dist/utils/cn.d.ts +2 -0
  29. package/dist/utils/date-time.d.ts +2 -0
  30. package/dist/utils/device.d.ts +2 -0
  31. package/dist/utils/fullscreen.d.ts +19 -0
  32. package/dist/utils/player.d.ts +3 -0
  33. package/package.json +87 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 React Video Player
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # React Video Player
2
+
3
+ A React video player supporting HLS / Dash protocol for VOD / live streaming.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @halibegic/react-video-player
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### VOD Player
14
+
15
+ ```tsx
16
+ import { VodPlayer } from "@halibegic/react-video-player";
17
+
18
+ function App() {
19
+ return <VodPlayer url="https://example.com/vod.m3u8" />;
20
+ }
21
+ ```
22
+
23
+ ### Live Player
24
+
25
+ ```tsx
26
+ import { LivePlayer } from "@halibegic/react-video-player";
27
+
28
+ function App() {
29
+ return <LivePlayer url="https://example.com/live.m3u8" />;
30
+ }
31
+ ```
32
+
33
+ ## Development
34
+
35
+ ```bash
36
+ # Install dependencies
37
+ npm install
38
+
39
+ # Start development server
40
+ npm run dev
41
+
42
+ # Build library
43
+ npm run build
44
+
45
+ # Lint code
46
+ npm run lint
47
+ ```
48
+
49
+ ## License
50
+
51
+ MIT © [halibegic](https://github.com/halibegic)
52
+
53
+ ## Note
54
+
55
+ This is a closed, private development project.
@@ -0,0 +1,2 @@
1
+ declare function useDebounce<T>(value: T, delay?: number): T;
2
+ export { useDebounce };
@@ -0,0 +1,6 @@
1
+ type LivePlayerProps = {
2
+ url: string;
3
+ };
4
+ declare function LivePlayer(props: LivePlayerProps): import("react/jsx-runtime").JSX.Element;
5
+ export { LivePlayer };
6
+ export type { LivePlayerProps };
@@ -0,0 +1,3 @@
1
+ import { PropsWithChildren } from 'react';
2
+ declare function PlayerProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
3
+ export { PlayerProvider };
@@ -0,0 +1,7 @@
1
+ type PlayerTechProps = {
2
+ url: string;
3
+ isLive: boolean;
4
+ isMuted?: boolean;
5
+ };
6
+ declare function PlayerTech({ url, isLive, isMuted }: PlayerTechProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export { PlayerTech };
@@ -0,0 +1,6 @@
1
+ type PlayerDashTechProps = {
2
+ url: string;
3
+ isLive: boolean;
4
+ };
5
+ declare const PlayerDashTech: ({ url, isLive }: PlayerDashTechProps) => null;
6
+ export default PlayerDashTech;
@@ -0,0 +1,6 @@
1
+ type PlayerHlsTechProps = {
2
+ url: string;
3
+ isLive: boolean;
4
+ };
5
+ declare function PlayerHlsTech({ url, isLive }: PlayerHlsTechProps): null;
6
+ export default PlayerHlsTech;
@@ -0,0 +1,3 @@
1
+ import { ButtonProps } from '../../ui/button';
2
+ declare const PlayerFullscreen: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
3
+ export { PlayerFullscreen };
@@ -0,0 +1,4 @@
1
+ import { HTMLAttributes } from 'react';
2
+ type PlayerLoadingProps = HTMLAttributes<HTMLDivElement>;
3
+ declare function PlayerLoading({ className, ...props }: PlayerLoadingProps): import("react/jsx-runtime").JSX.Element | null;
4
+ export { PlayerLoading };
@@ -0,0 +1,12 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { ComponentProps } from 'react';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
7
+ type ButtonProps = ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ };
10
+ declare function Button({ className, variant, size, asChild, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
11
+ export { Button, buttonVariants };
12
+ export type { ButtonProps };
@@ -0,0 +1,4 @@
1
+ import { ComponentProps } from 'react';
2
+ import * as SliderPrimitive from "@radix-ui/react-slider";
3
+ declare function Slider({ className, defaultValue, value, min, max, ...props }: ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Slider };
@@ -0,0 +1,3 @@
1
+ import { LucideProps } from 'lucide-react';
2
+ declare function Spinner({ className, ...props }: LucideProps): import("react/jsx-runtime").JSX.Element;
3
+ export { Spinner };
@@ -0,0 +1,6 @@
1
+ type VodPlayerProps = {
2
+ url: string;
3
+ };
4
+ declare function VodPlayer(props: VodPlayerProps): import("react/jsx-runtime").JSX.Element;
5
+ export { VodPlayer };
6
+ export type { VodPlayerProps };
@@ -0,0 +1,5 @@
1
+ declare const PlayerSourceType: {
2
+ readonly hls: "hls";
3
+ readonly dash: "dash";
4
+ };
5
+ export { PlayerSourceType };