ez-vid-ang 22.0.8 → 22.0.10

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 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 | Angular | Node.js |
31
- | ----------- | ---------- | --------------------------------- |
32
- | ^21.2.x | ^21.2.x | [According to Angular docs](https://angular.dev/reference/versions#actively-supported-versions) |
33
- | ^22.0.0 | ^22.0.0 | [According to Angular docs](https://angular.dev/reference/versions#actively-supported-versions) |
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 'ez-vid-ang';
64
- import { evaAllIcons } from 'ez-vid-ang/icons';
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 'ez-vid-ang';
73
- import { evaPlayIcon, evaPauseIcon, evaFullscreenIcon, evaFullscreenExitIcon } from 'ez-vid-ang/icons';
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 '@angular/core';
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 'ez-vid-ang';
158
+ } from "ez-vid-ang";
148
159
 
149
160
  @Component({
150
- selector: 'app-player',
151
- templateUrl: './player.html',
152
- styleUrl: './player.scss',
161
+ selector: "app-player",
162
+ templateUrl: "./player.html",
163
+ styleUrl: "./player.scss",
153
164
  imports: [
154
165
  EvaBuffering,
155
166
  EvaControlsContainer,
@@ -168,9 +179,7 @@ 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
 
@@ -179,20 +188,24 @@ See [Simple Example](documentation/example-simple.md) and [Full-Featured Example
179
188
  ## Components
180
189
 
181
190
  Library has four groups of components. Click on the name to go to the documentation:
191
+
182
192
  - [**EvaCore**](documentation/core) – Main player component, icon registry, directives (keyboard shortcuts, configuration storage), and providers
183
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)
184
194
  - [**EvaBuffering**](documentation/buffering) – Loading and buffering indicators
185
195
  - [**EvaStreaming**](documentation/streaming) – Directives for HLS and DASH live streaming support
186
196
 
187
197
  ---
198
+
188
199
  ## Roadmap
189
200
 
190
201
  There are few functionalities I want to implement that are work in progress:
202
+
191
203
  - **Audio selection** - Select audio track for the video
192
204
  - **A/B loop** - Let users set loop start/end points on the scrub bar for segment replay. Useful for music/education.
193
205
  - **Double tap forward/backward** - Double-tap left/right halves of the video to seek backward/forward. Standard mobile UX (YouTube, Netflix).
194
206
 
195
207
  ---
208
+
196
209
  ## Development
197
210
 
198
211
  ### Linting
@@ -206,16 +219,29 @@ npx ng lint --fix # Auto-fix fixable errors
206
219
 
207
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.
208
221
 
222
+ ### Formatting
223
+
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.
232
+
209
233
  ---
234
+
210
235
  ### 💖 Support This Project
211
236
 
212
237
  If you wish to make a donation you can click the widget.
213
238
  [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/K3K01AFMO6)
214
239
 
215
240
  Your support helps:
241
+
216
242
  - Maintain the project
217
243
  - Add new features
218
244
  - Fix bugs
219
245
  - Provide long-term updates
220
246
 
221
- Thank you for your generosity! 🙏
247
+ Thank you for your generosity! 🙏