@glitchlab/react-video-player 0.1.1 → 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/package.json CHANGED
@@ -1,88 +1,105 @@
1
1
  {
2
- "name": "@glitchlab/react-video-player",
3
- "version": "0.1.1",
4
- "description": "React video player with HLS support (hls.js) compatible with Next.js and TypeScript",
5
- "license": "MIT",
6
- "type": "module",
7
- "main": "./dist/index.cjs",
8
- "module": "./dist/index.mjs",
9
- "types": "./dist/index.d.ts",
10
- "style": "./dist/style.css",
11
- "files": [
12
- "dist",
13
- "README.md"
14
- ],
15
- "exports": {
16
- ".": {
17
- "types": "./dist/index.d.ts",
18
- "import": "./dist/index.mjs",
19
- "require": "./dist/index.cjs"
20
- },
21
- "./style.css": "./dist/style.css"
2
+ "name": "@glitchlab/react-video-player",
3
+ "version": "1.0.0",
4
+ "description": "React video player with HLS support (hls.js), device-mode toggle, hover-to-play, and zero global CSS side-effects. Works with Next.js App Router and TypeScript.",
5
+ "license": "MIT",
6
+ "author": "im-fahad",
7
+ "type": "module",
8
+ "main": "./dist/index.cjs",
9
+ "module": "./dist/index.mjs",
10
+ "types": "./dist/index.d.ts",
11
+ "style": "./dist/style.css",
12
+ "files": [
13
+ "dist",
14
+ "README.md",
15
+ "LICENSE"
16
+ ],
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.mjs",
21
+ "require": "./dist/index.cjs"
22
22
  },
23
- "sideEffects": [
24
- "./dist/style.css"
25
- ],
26
- "peerDependencies": {
27
- "react": ">=18",
28
- "react-dom": ">=18"
29
- },
30
- "dependencies": {
31
- "hls.js": "^1.5.0",
32
- "clsx": "^2.1.1"
33
- },
34
- "devDependencies": {
35
- "@eslint/js": "^10.0.1",
36
- "@tailwindcss/postcss": "^4.2.1",
37
- "@types/react": "^18",
38
- "@types/react-dom": "^18",
39
- "@typescript-eslint/eslint-plugin": "^8.56.1",
40
- "@typescript-eslint/parser": "^8.56.1",
41
- "@vitejs/plugin-react": "^4",
42
- "autoprefixer": "^10.4.27",
43
- "eslint": "^10.0.2",
44
- "eslint-config-prettier": "^10.1.8",
45
- "eslint-plugin-import": "^2.32.0",
46
- "eslint-plugin-react": "^7.37.5",
47
- "eslint-plugin-react-hooks": "^7.0.1",
48
- "postcss": "^8.5.8",
49
- "tailwindcss": "^4.2.1",
50
- "typescript": "^5",
51
- "typescript-eslint": "^8.56.1",
52
- "vite": "^5",
53
- "vite-plugin-dts": "^3"
54
- },
55
- "scripts": {
56
- "build": "vite build",
57
- "build:watch": "vite build --watch",
58
- "prepublishOnly": "pnpm build"
59
- },
60
- "repository": {
61
- "type": "git",
62
- "url": "https://github.com/im-fahad/react-video-player"
63
- },
64
- "keywords": [
65
- "react",
66
- "video",
67
- "player",
68
- "hls",
69
- "hls.js",
70
- "streaming",
71
- "m3u8",
72
- "video-player",
73
- "react-player",
74
- "nextjs",
75
- "typescript",
76
- "tailwindcss",
77
- "responsive",
78
- "mobile",
79
- "desktop",
80
- "adaptive",
81
- "overlay",
82
- "hover-play",
83
- "device-toggle",
84
- "react-video-player",
85
- "next-video-player",
86
- "hls-video-player"
87
- ]
88
- }
23
+ "./style.css": "./dist/style.css",
24
+ "./package.json": "./package.json"
25
+ },
26
+ "sideEffects": [
27
+ "**/*.css"
28
+ ],
29
+ "engines": {
30
+ "node": ">=18"
31
+ },
32
+ "peerDependencies": {
33
+ "hls.js": ">=1",
34
+ "react": ">=18",
35
+ "react-dom": ">=18"
36
+ },
37
+ "dependencies": {
38
+ "clsx": "^2.1.1"
39
+ },
40
+ "devDependencies": {
41
+ "@eslint/js": "^10.0.1",
42
+ "@testing-library/jest-dom": "^6.6.3",
43
+ "@testing-library/react": "^16.1.0",
44
+ "@types/react": "^18",
45
+ "@types/react-dom": "^18",
46
+ "@typescript-eslint/eslint-plugin": "^8.56.1",
47
+ "@typescript-eslint/parser": "^8.56.1",
48
+ "@vitejs/plugin-react": "^4",
49
+ "eslint": "^10.0.2",
50
+ "eslint-config-prettier": "^10.1.8",
51
+ "eslint-plugin-import": "^2.32.0",
52
+ "eslint-plugin-react": "^7.37.5",
53
+ "eslint-plugin-react-hooks": "^7.0.1",
54
+ "hls.js": "^1.5.0",
55
+ "jsdom": "^25.0.1",
56
+ "react": "^18",
57
+ "react-dom": "^18",
58
+ "typescript": "^5",
59
+ "typescript-eslint": "^8.56.1",
60
+ "vite": "^5",
61
+ "vite-plugin-dts": "^3",
62
+ "vitest": "^2.1.8"
63
+ },
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "git+https://github.com/im-fahad/react-video-player.git",
67
+ "directory": "packages/react-video-player"
68
+ },
69
+ "homepage": "https://github.com/im-fahad/react-video-player#readme",
70
+ "bugs": {
71
+ "url": "https://github.com/im-fahad/react-video-player/issues"
72
+ },
73
+ "keywords": [
74
+ "react",
75
+ "video",
76
+ "player",
77
+ "hls",
78
+ "hls.js",
79
+ "streaming",
80
+ "m3u8",
81
+ "video-player",
82
+ "react-player",
83
+ "nextjs",
84
+ "next-app-router",
85
+ "use-client",
86
+ "typescript",
87
+ "responsive",
88
+ "mobile",
89
+ "desktop",
90
+ "adaptive",
91
+ "overlay",
92
+ "hover-play",
93
+ "device-toggle",
94
+ "react-video-player",
95
+ "next-video-player",
96
+ "hls-video-player"
97
+ ],
98
+ "scripts": {
99
+ "build": "vite build",
100
+ "build:watch": "vite build --watch",
101
+ "test": "vitest run",
102
+ "test:watch": "vitest",
103
+ "lint": "eslint src"
104
+ }
105
+ }
@@ -1,5 +0,0 @@
1
- import { default as React } from 'react';
2
- import { HLSPlayerProps } from './types';
3
-
4
- export declare const HLSPlayer: React.ForwardRefExoticComponent<HLSPlayerProps & React.RefAttributes<HTMLVideoElement>>;
5
- export default HLSPlayer;
@@ -1,5 +0,0 @@
1
- import { default as React } from 'react';
2
- import { VideoPlayerWrapperProps } from './types';
3
-
4
- export declare const VideoPlayerWrapper: React.FC<VideoPlayerWrapperProps>;
5
- export default VideoPlayerWrapper;
@@ -1,3 +0,0 @@
1
-
2
- export { VideoPlayerWrapper as ReactVideoPlayer } from './VideoPlayerWrapper';
3
- export type { VideoPlayerWrapperProps as ReactVideoPlayerProps } from './types';
@@ -1,35 +0,0 @@
1
- import { HlsConfig } from 'hls.js';
2
-
3
- export type DeviceMode = "desktop" | "mobile";
4
- type AspectRatio = `${number}/${number}`;
5
- export type VideoPlayerWrapperProps = {
6
- src: string;
7
- poster?: string;
8
- showDeviceToggle?: boolean;
9
- defaultDevice?: DeviceMode;
10
- hoverPlay?: boolean;
11
- tooltipText?: string;
12
- onClose?: () => void;
13
- className?: string;
14
- muted?: boolean;
15
- loop?: boolean;
16
- controls?: boolean;
17
- frameMaxWidth?: {
18
- desktop?: string;
19
- mobile?: string;
20
- };
21
- aspectRatio?: {
22
- desktop?: AspectRatio;
23
- mobile?: AspectRatio;
24
- };
25
- };
26
- export interface HLSPlayerProps extends React.VideoHTMLAttributes<HTMLVideoElement> {
27
- src: string;
28
- hlsConfig?: HlsConfig;
29
- isHls?: boolean;
30
- }
31
- export interface HLSPlayerRef {
32
- video: HTMLVideoElement | null;
33
- cleanup: () => void;
34
- }
35
- export {};
@@ -1,12 +0,0 @@
1
- export declare const IconDesktop: ({ className }: {
2
- className?: string;
3
- }) => import("react/jsx-runtime").JSX.Element;
4
- export declare const IconMobile: ({ className }: {
5
- className?: string;
6
- }) => import("react/jsx-runtime").JSX.Element;
7
- export declare const IconX: ({ className }: {
8
- className?: string;
9
- }) => import("react/jsx-runtime").JSX.Element;
10
- export declare const IconPlay: ({ className }: {
11
- className?: string;
12
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- declare const _default: {
2
- content: string[];
3
- theme: {
4
- extend: {};
5
- };
6
- plugins: never[];
7
- };
8
- export default _default;