playron 1.0.0 → 1.0.1
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 +27 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
# Playron
|
|
2
2
|
|
|
3
|
-
Modern,
|
|
3
|
+
Modern, customizable OTT video player. Can be used in React, Next.js, and vanilla JavaScript projects.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Features
|
|
6
6
|
|
|
7
|
-
- 🎬 **Adaptive Streaming**: HLS
|
|
8
|
-
- 🔒 **DRM**: Widevine, PlayReady, FairPlay
|
|
9
|
-
- 📱 **Responsive**:
|
|
10
|
-
- 🎨
|
|
11
|
-
- 📊 **Analytics**:
|
|
12
|
-
- 📺 **Ads**: VAST/VMAP
|
|
13
|
-
- ⚡ **
|
|
7
|
+
- 🎬 **Adaptive Streaming**: HLS and DASH support
|
|
8
|
+
- 🔒 **DRM**: Widevine, PlayReady, FairPlay support
|
|
9
|
+
- 📱 **Responsive**: Mobile and desktop compatible
|
|
10
|
+
- 🎨 **Customizable**: All UI components can be customized
|
|
11
|
+
- 📊 **Analytics**: Integrated analytics support
|
|
12
|
+
- 📺 **Ads**: VAST/VMAP ad support
|
|
13
|
+
- ⚡ **Performant**: Optimized with React Compiler
|
|
14
14
|
- 🎯 **TypeScript**: Full type safety
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Installation
|
|
17
17
|
|
|
18
|
-
### Development
|
|
18
|
+
### For Development (npm link)
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
To use this project in other projects during development:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
# Playron
|
|
23
|
+
# In the Playron directory
|
|
24
24
|
npm install
|
|
25
25
|
npm run build
|
|
26
26
|
npm link
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Then in the project you will use it:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
npm link playron
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
### NPM
|
|
35
|
+
### From NPM
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
38
|
npm install playron
|
|
39
|
-
#
|
|
39
|
+
# or
|
|
40
40
|
yarn add playron
|
|
41
|
-
#
|
|
41
|
+
# or
|
|
42
42
|
pnpm add playron
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
##
|
|
45
|
+
## Usage
|
|
46
46
|
|
|
47
|
-
### React/Next.js
|
|
47
|
+
### In React/Next.js Projects
|
|
48
48
|
|
|
49
49
|
```tsx
|
|
50
50
|
import { Player } from 'playron';
|
|
@@ -64,7 +64,7 @@ function MyApp() {
|
|
|
64
64
|
}
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
### Vanilla JavaScript (MVC)
|
|
67
|
+
### In Vanilla JavaScript (MVC) Projects
|
|
68
68
|
|
|
69
69
|
```html
|
|
70
70
|
<!DOCTYPE html>
|
|
@@ -91,7 +91,7 @@ function MyApp() {
|
|
|
91
91
|
player.on('play', () => console.log('Video playing'));
|
|
92
92
|
player.on('pause', () => console.log('Video paused'));
|
|
93
93
|
|
|
94
|
-
// Player
|
|
94
|
+
// Player controls
|
|
95
95
|
player.play();
|
|
96
96
|
player.pause();
|
|
97
97
|
player.setVolume(0.5);
|
|
@@ -101,7 +101,7 @@ function MyApp() {
|
|
|
101
101
|
</html>
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
### UMD (Script tag
|
|
104
|
+
### UMD (with Script tag)
|
|
105
105
|
|
|
106
106
|
```html
|
|
107
107
|
<!DOCTYPE html>
|
|
@@ -211,14 +211,14 @@ function CustomPlayer() {
|
|
|
211
211
|
<ControlBar>
|
|
212
212
|
<PlayButton />
|
|
213
213
|
<MuteButton />
|
|
214
|
-
{/*
|
|
214
|
+
{/* Add your own custom controls */}
|
|
215
215
|
</ControlBar>
|
|
216
216
|
</div>
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
219
|
```
|
|
220
220
|
|
|
221
|
-
### DRM
|
|
221
|
+
### Using DRM
|
|
222
222
|
|
|
223
223
|
```tsx
|
|
224
224
|
<Player
|
|
@@ -265,9 +265,9 @@ npm run lint
|
|
|
265
265
|
|
|
266
266
|
## Build Output
|
|
267
267
|
|
|
268
|
-
|
|
269
|
-
- `playron.es.js` - ES Module (modern
|
|
270
|
-
- `playron.umd.js` - UMD format (
|
|
268
|
+
After building, the `dist/` folder will contain:
|
|
269
|
+
- `playron.es.js` - ES Module (for modern projects)
|
|
270
|
+
- `playron.umd.js` - UMD format (direct use in browser)
|
|
271
271
|
- `playron.css` - Styles
|
|
272
272
|
- `index.d.ts` - TypeScript definitions
|
|
273
273
|
|