vyrplay 0.0.0-stage → 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 +61 -2
- package/dist/vyrplay.css +681 -0
- package/dist/vyrplay.esm.js +1922 -0
- package/dist/vyrplay.umd.js +1962 -0
- package/package.json +43 -4
- package/src/VyrPlay.js +1331 -0
- package/src/engine/MediaEngine.js +369 -0
- package/src/index.js +3 -0
- package/src/ui/styles.css +681 -0
- package/src/ui/template.js +220 -0
- package/src/utils/events.js +25 -0
- package/src/utils/format.js +20 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 VyrPlay
|
|
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
CHANGED
|
@@ -1,3 +1,62 @@
|
|
|
1
|
-
#
|
|
1
|
+
# VyrPlay
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Custom HTML5 video player — MP4, HLS, multi-sub, separate audio.
|
|
4
|
+
Not a wrapper around Video.js or Plyr.
|
|
5
|
+
|
|
6
|
+
## Quick start
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm i vyrplay hls.js
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
import { VyrPlay } from 'vyrplay';
|
|
14
|
+
import 'vyrplay/style.css';
|
|
15
|
+
|
|
16
|
+
const player = new VyrPlay('#player', {
|
|
17
|
+
title: 'Episode 1',
|
|
18
|
+
sources: [
|
|
19
|
+
{ type: 'hls', url: 'https://cdn.example.com/master.m3u8', label: 'Auto' },
|
|
20
|
+
],
|
|
21
|
+
audio: null, // optional separate audio URL
|
|
22
|
+
tracks: [
|
|
23
|
+
{ src: 'https://cdn.example.com/id.vtt', label: 'ID', srclang: 'id', default: true },
|
|
24
|
+
],
|
|
25
|
+
features: {
|
|
26
|
+
quality: true,
|
|
27
|
+
subtitles: true,
|
|
28
|
+
pip: true,
|
|
29
|
+
lockUi: true,
|
|
30
|
+
holdToSpeed: true,
|
|
31
|
+
volume: true,
|
|
32
|
+
seekButtons: true,
|
|
33
|
+
settings: true,
|
|
34
|
+
back: false,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Local demo
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm run dev
|
|
43
|
+
# http://localhost:5173/ playground
|
|
44
|
+
# http://localhost:5173/demo/ fullscreen
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Build
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm run build
|
|
51
|
+
# → dist/vyrplay.esm.js, vyrplay.umd.js, vyrplay.css
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Production notes
|
|
55
|
+
|
|
56
|
+
- You host the **player**; you host (or CDN) the **media**. This is not a video server.
|
|
57
|
+
- Browser DevTools can always see client JS and media URLs. Use short-lived signed URLs for protection, not “obscure the bundle”.
|
|
58
|
+
- Set `features.back: true` only inside your app chrome; keep `false` for embeds.
|
|
59
|
+
|
|
60
|
+
## License
|
|
61
|
+
|
|
62
|
+
MIT
|