videojs-vue 0.0.0 → 0.1.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/README.md +47 -17
- package/dist/index-C0mUaTCA.d.ts +619 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +291 -4
- package/dist/media/hls.d.ts +87 -0
- package/dist/media/hls.js +30 -0
- package/dist/ui/index.d.ts +263 -0
- package/dist/ui/index.js +99 -0
- package/dist/useMediaElement-xb_hFj5K.js +147 -0
- package/package.json +40 -21
package/README.md
CHANGED
|
@@ -1,29 +1,59 @@
|
|
|
1
1
|
# videojs-vue
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/videojs-vue)
|
|
5
|
-
[](https://www.npmjs.com/package/videojs-vue)
|
|
6
|
-
[](https://github.com/ntnyq/videojs-vue/blob/main/LICENSE)
|
|
3
|
+
Vue 3 components and composables for Video.js 10. Start with a complete player, then compose your own interface using the same upstream store and media capabilities.
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
```sh
|
|
6
|
+
pnpm add videojs-vue vue
|
|
7
|
+
```
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
```vue
|
|
10
|
+
<script setup lang="ts">
|
|
11
|
+
import { VideoPlayer } from 'videojs-vue'
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<VideoPlayer
|
|
16
|
+
src="/demo.mp4"
|
|
17
|
+
poster="/poster.webp"
|
|
18
|
+
title="Demo"
|
|
19
|
+
/>
|
|
20
|
+
</template>
|
|
21
|
+
```
|
|
12
22
|
|
|
13
|
-
|
|
23
|
+
No `isCustomElement` configuration is needed when using the Vue components. Registration and packaged skin styles are included. Vue 3.5+ is required.
|
|
14
24
|
|
|
15
|
-
|
|
16
|
-
npm install videojs-vue
|
|
17
|
-
```
|
|
25
|
+
## Entry points
|
|
18
26
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
| Import | Purpose |
|
|
28
|
+
| ----------------------- | -------------------------------------------------------------- |
|
|
29
|
+
| `videojs-vue` | `VideoPlayer`, `PlayerRoot`, `Video`, skins, state and actions |
|
|
30
|
+
| `videojs-vue/media/hls` | Optional `HlsVideo` adapter and HLS source types |
|
|
31
|
+
| `videojs-vue/ui` | Composable upstream controls and layout components |
|
|
32
|
+
|
|
33
|
+
For HLS, install `@videojs/hlsjs-video@10.0.1` and pass `HlsVideo` to the `media` prop. The basic entry does not import hls.js.
|
|
34
|
+
|
|
35
|
+
See [getting started](docs/guide/getting-started.md), [API contracts](docs/api/overview.md), [composition](docs/guide/composition.md), and [lifecycle / SSR](docs/guide/lifecycle.md).
|
|
22
36
|
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
## Workspace
|
|
38
|
+
|
|
39
|
+
The root is the publishable package. Both `playground` and `docs` are private pnpm workspace packages consuming `videojs-vue` through `workspace:*`. Docs use VitePress **2.0.0-alpha.20** (the current v2 prerelease).
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
pnpm install
|
|
43
|
+
pnpm build
|
|
44
|
+
pnpm play:dev # localhost:5174
|
|
45
|
+
pnpm docs:dev # localhost:5173
|
|
46
|
+
pnpm release:check # format, lint, types, tests, package and both sites
|
|
25
47
|
```
|
|
26
48
|
|
|
49
|
+
Run `pnpm dev` in another terminal while changing library source. Both sites consume the built package. See [playground scenarios](docs/playground.md).
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This version focuses on on-demand native video and HLS. Packaged default/neutral skins and a small set of upstream control bindings share one player store. It does not recreate Video.js internals, maintain a second playback state machine, or introduce a plugin framework. Audio, dedicated live presets, YouTube/Mux adapters and persistence remain future work.
|
|
54
|
+
|
|
55
|
+
The previous provider/controller API and experimental component entrypoints have been removed. Migrate to `VideoPlayer` or `PlayerRoot` and the two composables described in the docs.
|
|
56
|
+
|
|
27
57
|
## License
|
|
28
58
|
|
|
29
|
-
[MIT](
|
|
59
|
+
[MIT](LICENSE)
|