video-react-new 0.21.1 → 0.21.2
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 +424 -31
- package/package.json +3 -30
package/README.md
CHANGED
|
@@ -2,89 +2,482 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/js/video-react-new)
|
|
4
4
|
[](http://packagequality.com/#?package=video-react-new)
|
|
5
|
-
[](https://codecov.io/gh/video-react-new/video-react-new)
|
|
6
5
|
|
|
7
|
-
Video
|
|
6
|
+
Video-React-New is a web video player built from the ground up for an HTML5 world using React library.
|
|
8
7
|
|
|
9
|
-
### ✨
|
|
8
|
+
### ✨ About Video-React-New
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
This is a maintained fork of the original [video-react](https://github.com/video-react/video-react) project, with continued support for modern React versions (React 15-19) and ongoing bug fixes. The project aims to provide a stable, feature-rich video player component for React applications.
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
**Key Features:**
|
|
13
|
+
- 🎬 HTML5 video player built specifically for React
|
|
14
|
+
- ⚛️ Full support for React 15, 16, 17, 18, and 19
|
|
15
|
+
- 📱 Responsive design that works on mobile and desktop
|
|
16
|
+
- 🎨 Customizable UI with SCSS/CSS
|
|
17
|
+
- 🔌 Plugin support for HLS, DASH and other formats
|
|
18
|
+
- ♿ Accessibility features with keyboard controls
|
|
19
|
+
- 🌐 Multiple subtitle/caption track support
|
|
20
|
+
- 🎛️ Playback rate control
|
|
21
|
+
- 📺 Fullscreen support
|
|
22
|
+
- 🔊 Volume control with mute toggle
|
|
14
23
|
|
|
15
24
|
## Installation
|
|
16
25
|
|
|
17
|
-
Install `video-react-new` and **peer dependencies** via NPM
|
|
26
|
+
Install `video-react-new` and **peer dependencies** via NPM:
|
|
18
27
|
|
|
19
28
|
```sh
|
|
20
29
|
npm install --save video-react-new react react-dom
|
|
21
30
|
```
|
|
22
31
|
|
|
23
|
-
|
|
32
|
+
Or using Yarn:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
yarn add video-react-new react react-dom
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
### Import Styles
|
|
41
|
+
|
|
42
|
+
You need to import the CSS styles. Choose one of the following methods:
|
|
43
|
+
|
|
44
|
+
**Method 1: Import CSS directly in your JavaScript**
|
|
24
45
|
|
|
25
46
|
```jsx
|
|
26
|
-
import '
|
|
47
|
+
import 'video-react-new/dist/video-react-new.css';
|
|
27
48
|
```
|
|
28
49
|
|
|
29
|
-
|
|
50
|
+
**Method 2: Import SCSS (for customization)**
|
|
30
51
|
|
|
31
52
|
```scss
|
|
32
|
-
@import '~video-react-new/styles/scss/video-react-new.scss';
|
|
53
|
+
@import '~video-react-new/styles/scss/video-react-new.scss';
|
|
33
54
|
```
|
|
34
55
|
|
|
56
|
+
**Method 3: Link in HTML**
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<link
|
|
60
|
+
rel="stylesheet"
|
|
61
|
+
href="https://unpkg.com/video-react-new/dist/video-react-new.css"
|
|
62
|
+
/>
|
|
63
|
+
```
|
|
35
64
|
|
|
65
|
+
### Basic Example
|
|
36
66
|
|
|
37
|
-
Import the
|
|
67
|
+
Import the `Player` component and use it in your React application:
|
|
38
68
|
|
|
39
|
-
```
|
|
69
|
+
```jsx
|
|
40
70
|
import React from 'react';
|
|
41
71
|
import { Player } from 'video-react-new';
|
|
42
72
|
|
|
43
|
-
export default
|
|
73
|
+
export default function VideoPlayer() {
|
|
44
74
|
return (
|
|
45
75
|
<Player>
|
|
46
76
|
<source src="https://media.w3.org/2010/05/sintel/trailer_hd.mp4" />
|
|
47
77
|
</Player>
|
|
48
78
|
);
|
|
49
|
-
}
|
|
79
|
+
}
|
|
50
80
|
```
|
|
51
81
|
|
|
82
|
+
### Advanced Example with Multiple Sources and Subtitles
|
|
83
|
+
|
|
84
|
+
```jsx
|
|
85
|
+
import React from 'react';
|
|
86
|
+
import { Player, BigPlayButton } from 'video-react-new';
|
|
87
|
+
|
|
88
|
+
export default function AdvancedPlayer() {
|
|
89
|
+
return (
|
|
90
|
+
<Player
|
|
91
|
+
playsInline
|
|
92
|
+
poster="/assets/poster.png"
|
|
93
|
+
src="https://media.w3.org/2010/05/sintel/trailer_hd.mp4"
|
|
94
|
+
>
|
|
95
|
+
<source src="https://media.w3.org/2010/05/sintel/trailer_hd.mp4" />
|
|
96
|
+
<track
|
|
97
|
+
kind="captions"
|
|
98
|
+
src="/assets/captions.en.vtt"
|
|
99
|
+
srclang="en"
|
|
100
|
+
label="English"
|
|
101
|
+
default
|
|
102
|
+
/>
|
|
103
|
+
<track
|
|
104
|
+
kind="captions"
|
|
105
|
+
src="/assets/captions.es.vtt"
|
|
106
|
+
srclang="es"
|
|
107
|
+
label="Spanish"
|
|
108
|
+
/>
|
|
109
|
+
<BigPlayButton position="center" />
|
|
110
|
+
</Player>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Controlling the Player
|
|
116
|
+
|
|
117
|
+
You can control the player programmatically using refs:
|
|
118
|
+
|
|
119
|
+
```jsx
|
|
120
|
+
import React, { useRef } from 'react';
|
|
121
|
+
import { Player } from 'video-react-new';
|
|
122
|
+
|
|
123
|
+
export default function ControlledPlayer() {
|
|
124
|
+
const playerRef = useRef(null);
|
|
125
|
+
|
|
126
|
+
const handlePlay = () => {
|
|
127
|
+
playerRef.current.play();
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const handlePause = () => {
|
|
131
|
+
playerRef.current.pause();
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const handleSeek = (seconds) => {
|
|
135
|
+
playerRef.current.seek(seconds);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<div>
|
|
140
|
+
<Player ref={playerRef}>
|
|
141
|
+
<source src="https://media.w3.org/2010/05/sintel/trailer_hd.mp4" />
|
|
142
|
+
</Player>
|
|
143
|
+
<button onClick={handlePlay}>Play</button>
|
|
144
|
+
<button onClick={handlePause}>Pause</button>
|
|
145
|
+
<button onClick={() => handleSeek(10)}>Skip to 10s</button>
|
|
146
|
+
</div>
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Using with State Management
|
|
152
|
+
|
|
153
|
+
```jsx
|
|
154
|
+
import React, { useRef, useEffect } from 'react';
|
|
155
|
+
import { Player } from 'video-react-new';
|
|
156
|
+
|
|
157
|
+
export default function StatePlayer() {
|
|
158
|
+
const playerRef = useRef(null);
|
|
159
|
+
|
|
160
|
+
useEffect(() => {
|
|
161
|
+
// Subscribe to player state changes
|
|
162
|
+
playerRef.current.subscribeToStateChange((state, prevState) => {
|
|
163
|
+
console.log('Current time:', state.currentTime);
|
|
164
|
+
console.log('Duration:', state.duration);
|
|
165
|
+
console.log('Playing:', !state.paused);
|
|
166
|
+
});
|
|
167
|
+
}, []);
|
|
168
|
+
|
|
169
|
+
return (
|
|
170
|
+
<Player ref={playerRef}>
|
|
171
|
+
<source src="https://media.w3.org/2010/05/sintel/trailer_hd.mp4" />
|
|
172
|
+
</Player>
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Available Components
|
|
178
|
+
|
|
179
|
+
- `Player` - Main video player component
|
|
180
|
+
- `BigPlayButton` - Large play button overlay
|
|
181
|
+
- `LoadingSpinner` - Loading indicator
|
|
182
|
+
- `PosterImage` - Poster image component
|
|
183
|
+
- `ControlBar` - Player control bar
|
|
184
|
+
- `PlayToggle` - Play/pause button
|
|
185
|
+
- `ForwardControl` - Forward skip button
|
|
186
|
+
- `ReplayControl` - Replay/rewind button
|
|
187
|
+
- `FullscreenToggle` - Fullscreen button
|
|
188
|
+
- `ProgressControl` - Progress bar
|
|
189
|
+
- `SeekBar` - Seekable progress bar
|
|
190
|
+
- `PlaybackRateMenuButton` - Playback speed control
|
|
191
|
+
- `VolumeMenuButton` - Volume control
|
|
192
|
+
- `ClosedCaptionButton` - Closed captions toggle
|
|
193
|
+
- `RemainingTimeDisplay` - Remaining time display
|
|
194
|
+
- `CurrentTimeDisplay` - Current time display
|
|
195
|
+
- `DurationDisplay` - Total duration display
|
|
196
|
+
- `TimeDivider` - Time divider
|
|
197
|
+
- `Bezel` - Animated bezel for actions
|
|
198
|
+
- `Shortcut` - Keyboard shortcuts
|
|
199
|
+
|
|
200
|
+
## API Documentation
|
|
201
|
+
|
|
202
|
+
### Player Props
|
|
203
|
+
|
|
204
|
+
| Prop | Type | Default | Description |
|
|
205
|
+
|------|------|---------|-------------|
|
|
206
|
+
| `fluid` | boolean | `true` | Player size follows container width |
|
|
207
|
+
| `width` | number | - | Player width in pixels |
|
|
208
|
+
| `height` | number | - | Player height in pixels |
|
|
209
|
+
| `src` | string | - | Video source URL |
|
|
210
|
+
| `poster` | string | - | Poster image URL |
|
|
211
|
+
| `preload` | string | `'auto'` | Preload strategy: 'auto', 'metadata', 'none' |
|
|
212
|
+
| `autoPlay` | boolean | `false` | Autoplay video on load |
|
|
213
|
+
| `loop` | boolean | `false` | Loop video playback |
|
|
214
|
+
| `muted` | boolean | `false` | Mute video by default |
|
|
215
|
+
| `playsInline` | boolean | `false` | Play inline on mobile devices |
|
|
216
|
+
| `aspectRatio` | string | `'auto'` | Aspect ratio (e.g., '16:9', '4:3') |
|
|
217
|
+
| `startTime` | number | - | Start playback at specific time (seconds) |
|
|
218
|
+
|
|
219
|
+
### Player Methods (via ref)
|
|
220
|
+
|
|
221
|
+
| Method | Description |
|
|
222
|
+
|--------|-------------|
|
|
223
|
+
| `play()` | Start playback |
|
|
224
|
+
| `pause()` | Pause playback |
|
|
225
|
+
| `load()` | Load video |
|
|
226
|
+
| `seek(time)` | Seek to specific time in seconds |
|
|
227
|
+
| `forward(seconds)` | Skip forward by seconds |
|
|
228
|
+
| `replay(seconds)` | Skip backward by seconds |
|
|
229
|
+
| `changeRate(rate)` | Change playback rate (0.5, 1, 1.5, 2, etc.) |
|
|
230
|
+
| `changeVolume(volume)` | Change volume (0 to 1) |
|
|
231
|
+
| `mute()` | Mute audio |
|
|
232
|
+
| `unmute()` | Unmute audio |
|
|
233
|
+
| `toggleFullscreen()` | Toggle fullscreen mode |
|
|
234
|
+
| `subscribeToStateChange(callback)` | Subscribe to state changes |
|
|
235
|
+
|
|
52
236
|
## Browser support
|
|
53
237
|
|
|
54
238
|
| Browser | Windows | Mac | Linux | Android | iOS |
|
|
55
239
|
| :-----: | :------: | :---: | :---: | :------: | :--------: |
|
|
56
|
-
| Chrome | **
|
|
57
|
-
| Firefox | **
|
|
58
|
-
| Edge | **
|
|
59
|
-
| IE 11 |
|
|
60
|
-
| Safari | - | **
|
|
240
|
+
| Chrome | **Yes** | **Yes** | **Yes** | **Yes** | **Native** |
|
|
241
|
+
| Firefox | **Yes** | **Yes** | **Yes** | **Yes** | **Native** |
|
|
242
|
+
| Edge | **Yes** | **Yes** | - | - | - |
|
|
243
|
+
| IE 11 | Untested | - | - | - | - |
|
|
244
|
+
| Safari | - | **Yes** | - | - | **Yes** |
|
|
245
|
+
|
|
246
|
+
**Notes:**
|
|
247
|
+
- Only the latest stable version is actively tested and supported
|
|
248
|
+
- Video-react-new may work in older browser releases, and we accept pull requests for them
|
|
249
|
+
- "Native" means the browser's native video player is used on mobile
|
|
250
|
+
- For "Untested" browsers, community testing is welcome
|
|
251
|
+
|
|
252
|
+
## HLS and DASH Support
|
|
253
|
+
|
|
254
|
+
For HLS (HTTP Live Streaming) playback, you can use [hls.js](https://github.com/video-dev/hls.js):
|
|
255
|
+
|
|
256
|
+
```jsx
|
|
257
|
+
import React, { useRef, useEffect } from 'react';
|
|
258
|
+
import { Player } from 'video-react-new';
|
|
259
|
+
import Hls from 'hls.js';
|
|
260
|
+
|
|
261
|
+
export default function HLSPlayer() {
|
|
262
|
+
const playerRef = useRef(null);
|
|
263
|
+
|
|
264
|
+
useEffect(() => {
|
|
265
|
+
const player = playerRef.current;
|
|
266
|
+
if (Hls.isSupported()) {
|
|
267
|
+
const hls = new Hls();
|
|
268
|
+
hls.loadSource('https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8');
|
|
269
|
+
hls.attachMedia(player.video.video);
|
|
270
|
+
} else if (player.video.video.canPlayType('application/vnd.apple.mpegurl')) {
|
|
271
|
+
player.video.video.src = 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8';
|
|
272
|
+
}
|
|
273
|
+
}, []);
|
|
274
|
+
|
|
275
|
+
return (
|
|
276
|
+
<Player ref={playerRef}>
|
|
277
|
+
<source src="https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8" type="application/x-mpegURL" />
|
|
278
|
+
</Player>
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## Keyboard Shortcuts
|
|
284
|
+
|
|
285
|
+
When the player is focused, you can use these keyboard shortcuts:
|
|
286
|
+
|
|
287
|
+
| Key | Action |
|
|
288
|
+
|-----|--------|
|
|
289
|
+
| `Space` or `K` | Play/Pause |
|
|
290
|
+
| `←` | Rewind 5 seconds |
|
|
291
|
+
| `→` | Forward 5 seconds |
|
|
292
|
+
| `↑` | Increase volume |
|
|
293
|
+
| `↓` | Decrease volume |
|
|
294
|
+
| `F` | Toggle fullscreen |
|
|
295
|
+
| `M` | Toggle mute |
|
|
296
|
+
| `0-9` | Jump to 0%-90% of video |
|
|
297
|
+
| `Home` | Jump to beginning |
|
|
298
|
+
| `End` | Jump to end |
|
|
299
|
+
|
|
300
|
+
## Styling and Customization
|
|
61
301
|
|
|
62
|
-
|
|
302
|
+
The player can be styled using CSS or SCSS. All components have BEM-style class names:
|
|
63
303
|
|
|
64
|
-
|
|
304
|
+
```css
|
|
305
|
+
/* Custom player styles */
|
|
306
|
+
.video-react .video-react-big-play-button {
|
|
307
|
+
background-color: #ff0000;
|
|
308
|
+
border-color: #ff0000;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.video-react .video-react-control-bar {
|
|
312
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.video-react .video-react-play-progress {
|
|
316
|
+
background-color: #ff0000;
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
For SCSS customization, you can override variables before importing:
|
|
321
|
+
|
|
322
|
+
```scss
|
|
323
|
+
// Override default variables
|
|
324
|
+
$primary-background-color: #000;
|
|
325
|
+
$primary-foreground-color: #fff;
|
|
326
|
+
$primary-color: #ff0000;
|
|
327
|
+
|
|
328
|
+
// Import the styles
|
|
329
|
+
@import '~video-react-new/styles/scss/video-react-new.scss';
|
|
330
|
+
```
|
|
65
331
|
|
|
66
332
|
## Development
|
|
67
333
|
|
|
68
|
-
|
|
334
|
+
### Setup
|
|
69
335
|
|
|
70
|
-
|
|
336
|
+
Clone the repository and install dependencies:
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
git clone https://github.com/thind9xdev/video-react-new-dart.git
|
|
340
|
+
cd video-react-new-dart
|
|
341
|
+
npm install
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### Run Development Server
|
|
345
|
+
|
|
346
|
+
Start the development server with hot reloading:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
npm start
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
The documentation site will be available at `http://localhost:8000`.
|
|
353
|
+
|
|
354
|
+
### Run Tests
|
|
355
|
+
|
|
356
|
+
Run the test suite:
|
|
357
|
+
|
|
358
|
+
```bash
|
|
71
359
|
npm test
|
|
72
360
|
```
|
|
73
361
|
|
|
74
|
-
|
|
362
|
+
Run tests in watch mode:
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
npm run test:watch
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Run tests with coverage:
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
npm run test:coverage
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### Build
|
|
375
|
+
|
|
376
|
+
Build the library:
|
|
377
|
+
|
|
378
|
+
```bash
|
|
379
|
+
npm run build
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
Build the documentation:
|
|
75
383
|
|
|
76
384
|
```bash
|
|
77
|
-
|
|
78
|
-
|
|
385
|
+
npm run build-docs
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Linting
|
|
389
|
+
|
|
390
|
+
Run ESLint:
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
npm run lint
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
Format code with Prettier:
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
npm run format-all
|
|
79
400
|
```
|
|
80
401
|
|
|
81
402
|
## Contribution
|
|
82
403
|
|
|
83
|
-
|
|
404
|
+
We welcome contributions! If you'd like to contribute to video-react-new:
|
|
405
|
+
|
|
406
|
+
1. **Fork the repository** on GitHub
|
|
407
|
+
2. **Clone your fork** locally
|
|
408
|
+
3. **Create a feature branch**: `git checkout -b my-new-feature`
|
|
409
|
+
4. **Make your changes** and add tests if applicable
|
|
410
|
+
5. **Run tests**: `npm test`
|
|
411
|
+
6. **Commit your changes**: `git commit -am 'Add some feature'`
|
|
412
|
+
7. **Push to the branch**: `git push origin my-new-feature`
|
|
413
|
+
8. **Submit a pull request**
|
|
414
|
+
|
|
415
|
+
For more detailed information, please read the [contribution guide](./CONTRIBUTION.md).
|
|
416
|
+
|
|
417
|
+
### Reporting Issues
|
|
418
|
+
|
|
419
|
+
If you encounter a bug or have a feature request:
|
|
420
|
+
|
|
421
|
+
1. Check the [issue list](https://github.com/thind9xdev/video-react-new-dart/issues) first
|
|
422
|
+
2. If not already reported, create a new issue
|
|
423
|
+
3. Provide as much detail as possible:
|
|
424
|
+
- Steps to reproduce the bug
|
|
425
|
+
- Expected vs actual behavior
|
|
426
|
+
- Browser and version
|
|
427
|
+
- React version
|
|
428
|
+
- Code examples or screenshots
|
|
429
|
+
|
|
430
|
+
## FAQ
|
|
431
|
+
|
|
432
|
+
### How do I customize the player appearance?
|
|
433
|
+
|
|
434
|
+
You can customize the player by overriding CSS classes or importing the SCSS and modifying variables. See the [Styling and Customization](#styling-and-customization) section.
|
|
435
|
+
|
|
436
|
+
### Does it support HLS/DASH streaming?
|
|
437
|
+
|
|
438
|
+
Yes! You can use libraries like hls.js or dash.js with video-react-new. See the [HLS and DASH Support](#hls-and-dash-support) section.
|
|
439
|
+
|
|
440
|
+
### Can I use this with TypeScript?
|
|
441
|
+
|
|
442
|
+
Yes, the package includes TypeScript type definitions.
|
|
443
|
+
|
|
444
|
+
### How do I access the native video element?
|
|
445
|
+
|
|
446
|
+
Use a ref to access the player, then use `playerRef.current.video.video` to access the native HTML5 video element.
|
|
447
|
+
|
|
448
|
+
### Does it work with Next.js?
|
|
449
|
+
|
|
450
|
+
Yes, video-react-new works with Next.js. Just make sure to import styles appropriately for your Next.js configuration.
|
|
451
|
+
|
|
452
|
+
## License
|
|
453
|
+
|
|
454
|
+
MIT © [Video-React-New Contributors](https://github.com/thind9xdev/video-react-new-dart/graphs/contributors)
|
|
84
455
|
|
|
85
456
|
## Inspiration & Credits
|
|
86
457
|
|
|
87
|
-
- This project is
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
458
|
+
- This project is a maintained fork of [video-react](https://github.com/video-react/video-react)
|
|
459
|
+
- Heavily inspired by [video.js](http://www.videojs.com)
|
|
460
|
+
- CSS styles adapted from [video.js's styles](https://github.com/videojs/video.js/tree/master/src/css)
|
|
461
|
+
- Documentation site built with [reactstrap](https://github.com/reactstrap/reactstrap)
|
|
462
|
+
- Icons from [Google Material Icons](https://material.io/icons/)
|
|
463
|
+
- Fonts built with [IcoMoon](https://icomoon.io/)
|
|
464
|
+
|
|
465
|
+
## Links
|
|
466
|
+
|
|
467
|
+
- [GitHub Repository](https://github.com/thind9xdev/video-react-new-dart)
|
|
468
|
+
- [NPM Package](https://www.npmjs.com/package/video-react-new)
|
|
469
|
+
- [Issue Tracker](https://github.com/thind9xdev/video-react-new-dart/issues)
|
|
470
|
+
- [Changelog](./CHANGELOG.md)
|
|
471
|
+
|
|
472
|
+
## Support
|
|
473
|
+
|
|
474
|
+
If you find this project useful, please consider:
|
|
475
|
+
- ⭐ Starring the repository
|
|
476
|
+
- 🐛 Reporting bugs
|
|
477
|
+
- 💡 Suggesting new features
|
|
478
|
+
- 🤝 Contributing code or documentation
|
|
479
|
+
- 📢 Sharing with others
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
**Made with ❤️ by the Video-React-New community**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "video-react-new",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.2",
|
|
4
4
|
"description": "video-react-new is a web video player built from the ground up for an HTML5 world using React library.",
|
|
5
5
|
"main": "dist/video-react-new.cjs.js",
|
|
6
6
|
"module": "dist/video-react-new.es.js",
|
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
"test": "BABEL_ENV=test jest",
|
|
11
11
|
"test:watch": "BABEL_ENV=test jest --watch",
|
|
12
12
|
"test:coverage": "BABEL_ENV=test jest --coverage",
|
|
13
|
-
"start": "cross-env NODE_OPTIONS=\"--openssl-legacy-provider\" webpack-dev-server --watch",
|
|
14
|
-
"build-docs": "cross-env WEBPACK_BUILD=production NODE_OPTIONS=\"--openssl-legacy-provider\" webpack --progress --colors",
|
|
15
13
|
"build": "rollup -c && cp src/index.d.ts dist/index.d.ts",
|
|
16
14
|
"prebuild": "cross-env BABEL_ENV=lib-dir babel src --out-dir lib --ignore src/__tests__/",
|
|
17
15
|
"create-release": "npm test && sh ./scripts/release",
|
|
@@ -20,7 +18,7 @@
|
|
|
20
18
|
"create-patch": "sh ./scripts/release patch",
|
|
21
19
|
"publish-release": "npm test && sh ./scripts/publish",
|
|
22
20
|
"lint": "eslint src",
|
|
23
|
-
"format-all": "prettier --config .prettierrc.js --write \"src/**/*.{js,json,md}\" \"
|
|
21
|
+
"format-all": "prettier --config .prettierrc.js --write \"src/**/*.{js,json,md}\" \"*.{js,json,md}\"",
|
|
24
22
|
"format-one": "prettier --config .prettierrc.js --write"
|
|
25
23
|
},
|
|
26
24
|
"husky": {
|
|
@@ -101,16 +99,10 @@
|
|
|
101
99
|
"@cfaester/enzyme-adapter-react-18": "^0.8.0",
|
|
102
100
|
"babel-eslint": "^10.0.1",
|
|
103
101
|
"babel-jest": "^24.8.0",
|
|
104
|
-
"babel-loader": "^8.0.6",
|
|
105
|
-
"bootstrap": "^4.3.1",
|
|
106
|
-
"clean-webpack-plugin": "^1.0.0",
|
|
107
102
|
"conventional-changelog-cli": "^1.3.22",
|
|
108
103
|
"conventional-recommended-bump": "^1.0.0",
|
|
109
|
-
"copy-webpack-plugin": "^4.6.0",
|
|
110
104
|
"cross-env": "^2.0.0",
|
|
111
|
-
"css-loader": "^2.1.1",
|
|
112
105
|
"deep-freeze": "0.0.1",
|
|
113
|
-
"ejs": "^2.6.1",
|
|
114
106
|
"enzyme": "^3.10.0",
|
|
115
107
|
"eslint": "^5.16.0",
|
|
116
108
|
"eslint-config-airbnb": "^17.1.0",
|
|
@@ -118,23 +110,12 @@
|
|
|
118
110
|
"eslint-plugin-import": "^2.17.3",
|
|
119
111
|
"eslint-plugin-jsx-a11y": "^6.2.1",
|
|
120
112
|
"eslint-plugin-react": "^7.13.0",
|
|
121
|
-
"file-loader": "^3.0.1",
|
|
122
|
-
"history": "^3.0.0",
|
|
123
|
-
"hls.js": "^0.6.10",
|
|
124
|
-
"holderjs": "^2.9.6",
|
|
125
113
|
"husky": "^1.3.1",
|
|
126
114
|
"jest": "^24.8.0",
|
|
127
|
-
"json-loader": "^0.5.7",
|
|
128
115
|
"lint-staged": "^8.2.0",
|
|
129
|
-
"mini-css-extract-plugin": "^0.5.0",
|
|
130
116
|
"prettier": "^1.18.2",
|
|
131
|
-
"raw-loader": "^1.0.0",
|
|
132
117
|
"react": "^18.3.1",
|
|
133
118
|
"react-dom": "^18.3.1",
|
|
134
|
-
"react-helmet": "^5.2.1",
|
|
135
|
-
"react-prism": "^4.3.2",
|
|
136
|
-
"react-router": "^3.2.1",
|
|
137
|
-
"reactstrap": "^7.0.2",
|
|
138
119
|
"rollup": "^1.15.1",
|
|
139
120
|
"rollup-plugin-babel": "^4.2.0",
|
|
140
121
|
"rollup-plugin-babel-minify": "^7.0.0",
|
|
@@ -143,14 +124,6 @@
|
|
|
143
124
|
"rollup-plugin-replace": "^2.2.0",
|
|
144
125
|
"rollup-plugin-sass": "^1.2.2",
|
|
145
126
|
"sass": "^1.70.0",
|
|
146
|
-
"
|
|
147
|
-
"sinon": "^1.17.6",
|
|
148
|
-
"static-site-generator-webpack-plugin": "^3.4.2",
|
|
149
|
-
"style-loader": "^0.13.1",
|
|
150
|
-
"uglifyjs-webpack-plugin": "^2.1.3",
|
|
151
|
-
"url-loader": "^1.1.2",
|
|
152
|
-
"webpack": "^4.33.0",
|
|
153
|
-
"webpack-cli": "^3.3.4",
|
|
154
|
-
"webpack-dev-server": "^3.7.1"
|
|
127
|
+
"sinon": "^1.17.6"
|
|
155
128
|
}
|
|
156
129
|
}
|