ez-vid-ang 22.0.7 → 22.0.9
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 +63 -28
- package/assets/eva-required-import.scss +274 -257
- package/fesm2022/ez-vid-ang-icons.mjs.map +1 -1
- package/fesm2022/ez-vid-ang.mjs +2781 -1464
- package/fesm2022/ez-vid-ang.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ez-vid-ang.d.ts +942 -286
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Highly configurable, performant and easy-to-use Angular component library for video playback and streaming.
|
|
4
4
|
|
|
5
5
|
## Why to use it?
|
|
6
|
+
|
|
6
7
|
🚦 **Signal based components** - Granular and optimized render updates<br/>
|
|
7
8
|
⚡ **Zoneless** - Built for zoneless Angular applications by default<br/>
|
|
8
9
|
🧩 **Standalone architecture** – No NgModules required; simpler imports, better tree-shaking, and improved DX<br/>
|
|
@@ -27,19 +28,23 @@ Example project can be found on [Stackblitz](https://stackblitz.com/edit/stackbl
|
|
|
27
28
|
|
|
28
29
|
EzVidAng updates and develops the library for the 2 latest versions.
|
|
29
30
|
|
|
30
|
-
| EzVidAng
|
|
31
|
-
|
|
|
32
|
-
| ^21.2.x
|
|
33
|
-
| ^22.0.
|
|
34
|
-
|
|
31
|
+
| EzVidAng | Angular | Node.js |
|
|
32
|
+
| -------- | ------- | ----------------------------------------------------------------------------------------------- |
|
|
33
|
+
| ^21.2.x | ^21.2.x | [According to Angular docs](https://angular.dev/reference/versions#actively-supported-versions) |
|
|
34
|
+
| ^22.0.x | ^22.0.x | [According to Angular docs](https://angular.dev/reference/versions#actively-supported-versions) |
|
|
35
|
+
| ^22.1.x | ^22.1.x | [According to Angular docs](https://angular.dev/reference/versions#actively-supported-versions) |
|
|
36
|
+
| ^22.2.x | ^22.2.x | [According to Angular docs](https://angular.dev/reference/versions#actively-supported-versions) |
|
|
35
37
|
|
|
36
38
|
## Installing and preparation
|
|
37
39
|
|
|
38
40
|
Install the package:
|
|
41
|
+
|
|
39
42
|
```
|
|
40
43
|
npm i ez-vid-ang
|
|
41
44
|
```
|
|
45
|
+
|
|
42
46
|
Add the required styles to your angular.json:
|
|
47
|
+
|
|
43
48
|
```
|
|
44
49
|
{
|
|
45
50
|
"projects": {
|
|
@@ -57,11 +62,12 @@ Add the required styles to your angular.json:
|
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
64
|
```
|
|
65
|
+
|
|
60
66
|
Register the built-in icons once in your `main.ts` (or any bootstrapping code that runs before your components render):
|
|
61
67
|
|
|
62
68
|
```typescript
|
|
63
|
-
import { addEvaIcons } from
|
|
64
|
-
import { evaAllIcons } from
|
|
69
|
+
import { addEvaIcons } from "ez-vid-ang";
|
|
70
|
+
import { evaAllIcons } from "ez-vid-ang/icons";
|
|
65
71
|
|
|
66
72
|
addEvaIcons(evaAllIcons);
|
|
67
73
|
```
|
|
@@ -69,19 +75,21 @@ addEvaIcons(evaAllIcons);
|
|
|
69
75
|
To minimize bundle size, import only the icons your components use:
|
|
70
76
|
|
|
71
77
|
```typescript
|
|
72
|
-
import { addEvaIcons } from
|
|
73
|
-
import { evaPlayIcon, evaPauseIcon, evaFullscreenIcon, evaFullscreenExitIcon } from
|
|
78
|
+
import { addEvaIcons } from "ez-vid-ang";
|
|
79
|
+
import { evaPlayIcon, evaPauseIcon, evaFullscreenIcon, evaFullscreenExitIcon } from "ez-vid-ang/icons";
|
|
74
80
|
|
|
75
81
|
addEvaIcons({ evaPlayIcon, evaPauseIcon, evaFullscreenIcon, evaFullscreenExitIcon });
|
|
76
82
|
```
|
|
77
83
|
|
|
78
84
|
> [!IMPORTANT]
|
|
79
85
|
> **If you want to use HLS streaming directive you must install latest version of the hls.js.**
|
|
80
|
-
>
|
|
86
|
+
>
|
|
81
87
|
> ```
|
|
82
88
|
> npm i hls.js
|
|
83
|
-
|
|
89
|
+
> ```
|
|
90
|
+
>
|
|
84
91
|
> **And add the required script to your angular.json**
|
|
92
|
+
>
|
|
85
93
|
> ```
|
|
86
94
|
> {
|
|
87
95
|
> "projects": {
|
|
@@ -102,11 +110,13 @@ addEvaIcons({ evaPlayIcon, evaPauseIcon, evaFullscreenIcon, evaFullscreenExitIco
|
|
|
102
110
|
|
|
103
111
|
> [!IMPORTANT]
|
|
104
112
|
> **If you want to use DASH streaming directive you must install v5 of the dash.js.**
|
|
105
|
-
>
|
|
113
|
+
>
|
|
106
114
|
> ```
|
|
107
115
|
> npm i dashjs
|
|
108
|
-
|
|
116
|
+
> ```
|
|
117
|
+
>
|
|
109
118
|
> **And add the required script to your angular.json**
|
|
119
|
+
>
|
|
110
120
|
> ```
|
|
111
121
|
> {
|
|
112
122
|
> "projects": {
|
|
@@ -126,8 +136,9 @@ addEvaIcons({ evaPlayIcon, evaPauseIcon, evaFullscreenIcon, evaFullscreenExitIco
|
|
|
126
136
|
> ```
|
|
127
137
|
|
|
128
138
|
Import only the components you need — every component is standalone and tree-shakable:
|
|
139
|
+
|
|
129
140
|
```typescript
|
|
130
|
-
import { Component, signal } from
|
|
141
|
+
import { Component, signal } from "@angular/core";
|
|
131
142
|
import {
|
|
132
143
|
EvaBuffering,
|
|
133
144
|
EvaControlsContainer,
|
|
@@ -144,12 +155,12 @@ import {
|
|
|
144
155
|
EvaUserInteractionEventsDirective,
|
|
145
156
|
EvaVideoSource,
|
|
146
157
|
EvaVolume,
|
|
147
|
-
} from
|
|
158
|
+
} from "ez-vid-ang";
|
|
148
159
|
|
|
149
160
|
@Component({
|
|
150
|
-
selector:
|
|
151
|
-
templateUrl:
|
|
152
|
-
styleUrl:
|
|
161
|
+
selector: "app-player",
|
|
162
|
+
templateUrl: "./player.html",
|
|
163
|
+
styleUrl: "./player.scss",
|
|
153
164
|
imports: [
|
|
154
165
|
EvaBuffering,
|
|
155
166
|
EvaControlsContainer,
|
|
@@ -168,14 +179,33 @@ import {
|
|
|
168
179
|
],
|
|
169
180
|
})
|
|
170
181
|
export class PlayerComponent {
|
|
171
|
-
protected readonly sources = signal<EvaVideoSource[]>([
|
|
172
|
-
{ type: 'video/mp4', src: '/video.mp4' },
|
|
173
|
-
]);
|
|
182
|
+
protected readonly sources = signal<EvaVideoSource[]>([{ type: "video/mp4", src: "/video.mp4" }]);
|
|
174
183
|
}
|
|
175
184
|
```
|
|
176
185
|
|
|
177
186
|
See [Simple Example](documentation/example-simple.md) and [Full-Featured Example](documentation/example-configuration.md) for complete usage.
|
|
178
187
|
|
|
188
|
+
## Components
|
|
189
|
+
|
|
190
|
+
Library has four groups of components. Click on the name to go to the documentation:
|
|
191
|
+
|
|
192
|
+
- [**EvaCore**](documentation/core) – Main player component, icon registry, directives (keyboard shortcuts, configuration storage), and providers
|
|
193
|
+
- [**EvaControls**](documentation/controls) – Video control components (play/pause, volume, scrub bar, fullscreen, playback speed, quality selector, track selector, loop, picture-in-picture, download, screenshot, context menu, settings panel, keyboard shortcuts overlay, cinema mode, error overlay, chapter list, and more)
|
|
194
|
+
- [**EvaBuffering**](documentation/buffering) – Loading and buffering indicators
|
|
195
|
+
- [**EvaStreaming**](documentation/streaming) – Directives for HLS and DASH live streaming support
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Roadmap
|
|
200
|
+
|
|
201
|
+
There are few functionalities I want to implement that are work in progress:
|
|
202
|
+
|
|
203
|
+
- **Audio selection** - Select audio track for the video
|
|
204
|
+
- **A/B loop** - Let users set loop start/end points on the scrub bar for segment replay. Useful for music/education.
|
|
205
|
+
- **Double tap forward/backward** - Double-tap left/right halves of the video to seek backward/forward. Standard mobile UX (YouTube, Netflix).
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
179
209
|
## Development
|
|
180
210
|
|
|
181
211
|
### Linting
|
|
@@ -189,24 +219,29 @@ npx ng lint --fix # Auto-fix fixable errors
|
|
|
189
219
|
|
|
190
220
|
All magic numbers are centralized in `src/lib/constants.ts`. See [linting documentation](documentation/core/linting.md) and [constants documentation](documentation/core/constants.md) for details.
|
|
191
221
|
|
|
192
|
-
|
|
222
|
+
### Formatting
|
|
193
223
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
224
|
+
The project uses [Prettier](https://prettier.io) for code formatting, kept conflict-free with ESLint via `eslint-config-prettier`.
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
npm run format # Format all files
|
|
228
|
+
npm run format:check # Check formatting without writing changes
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Install the recommended `esbenp.prettier-vscode` VS Code extension for format-on-save. See [formatting documentation](documentation/core/formatting.md) for details.
|
|
199
232
|
|
|
200
233
|
---
|
|
234
|
+
|
|
201
235
|
### 💖 Support This Project
|
|
202
236
|
|
|
203
237
|
If you wish to make a donation you can click the widget.
|
|
204
238
|
[](https://ko-fi.com/K3K01AFMO6)
|
|
205
239
|
|
|
206
240
|
Your support helps:
|
|
241
|
+
|
|
207
242
|
- Maintain the project
|
|
208
243
|
- Add new features
|
|
209
244
|
- Fix bugs
|
|
210
245
|
- Provide long-term updates
|
|
211
246
|
|
|
212
|
-
Thank you for your generosity! 🙏
|
|
247
|
+
Thank you for your generosity! 🙏
|