ez-vid-ang 21.2.1 → 21.2.4
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 +53 -37
- package/assets/eva-required-import.scss +17 -0
- package/fesm2022/ez-vid-ang.mjs +4035 -1882
- package/fesm2022/ez-vid-ang.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ez-vid-ang.d.ts +1131 -210
package/README.md
CHANGED
|
@@ -7,11 +7,15 @@ Highly configurable, performant and easy-to-use Angular component library for vi
|
|
|
7
7
|
⚡ **Zoneless** - Built for zoneless Angular applications by default<br/>
|
|
8
8
|
🧩 **Standalone architecture** – No NgModules required; simpler imports, better tree-shaking, and improved DX<br/>
|
|
9
9
|
🚀 **High performance** – Powered by RxJS; change detection runs only when needed (no zone pollution)<br/>
|
|
10
|
-
🎨 **Highly customizable** –
|
|
10
|
+
🎨 **Highly customizable** – 200+ CSS variables, custom icons, and fonts. Bring your own assets<br/>
|
|
11
11
|
♿ **ARIA compliant** – All components follow ARIA standards and support custom inputs<br/>
|
|
12
12
|
🌍 **Multilanguage support** – Configurable text inputs for full localization<br/>
|
|
13
13
|
▶️ **Inspired by modern players** – Familiar UX similar to popular platforms<br/>
|
|
14
14
|
📱 **Responsive design** - Works across all screen sizes and devices<br/>
|
|
15
|
+
⚙️ **Settings panel** – YouTube-style navigable settings menu with sub-menus<br/>
|
|
16
|
+
⌨️ **Keyboard shortcuts overlay** – Press `?` to show all shortcuts, auto-integrated<br/>
|
|
17
|
+
💾 **Configuration storage** – Persist user preferences (volume, speed, loop, cinema mode) to localStorage<br/>
|
|
18
|
+
🎬 **Cinema mode** – Dim the page and focus on the video<br/>
|
|
15
19
|
|
|
16
20
|
## Example project
|
|
17
21
|
|
|
@@ -106,65 +110,77 @@ Add the required styles to your angular.json:
|
|
|
106
110
|
> }
|
|
107
111
|
> ```
|
|
108
112
|
|
|
109
|
-
Import the
|
|
110
|
-
```
|
|
111
|
-
import { Component } from '@angular/core';
|
|
113
|
+
Import only the components you need — every component is standalone and tree-shakable:
|
|
114
|
+
```typescript
|
|
115
|
+
import { Component, signal } from '@angular/core';
|
|
112
116
|
import {
|
|
113
|
-
EvaActiveChapter,
|
|
114
|
-
EvaBackward,
|
|
115
117
|
EvaBuffering,
|
|
116
|
-
|
|
118
|
+
EvaControlsContainer,
|
|
119
|
+
EvaControlsDivider,
|
|
120
|
+
EvaFullscreen,
|
|
121
|
+
EvaMute,
|
|
117
122
|
EvaOverlayPlay,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
EvaPlayer,
|
|
124
|
+
EvaPlayPause,
|
|
125
|
+
EvaScrubBar,
|
|
126
|
+
EvaScrubBarBufferingTime,
|
|
127
|
+
EvaScrubBarCurrentTime,
|
|
128
|
+
EvaTimeDisplay,
|
|
129
|
+
EvaUserInteractionEventsDirective,
|
|
130
|
+
EvaVideoSource,
|
|
131
|
+
EvaVolume,
|
|
132
|
+
} from 'ez-vid-ang';
|
|
127
133
|
|
|
128
134
|
@Component({
|
|
129
|
-
selector: '
|
|
130
|
-
templateUrl: './
|
|
131
|
-
styleUrl: './
|
|
135
|
+
selector: 'app-player',
|
|
136
|
+
templateUrl: './player.html',
|
|
137
|
+
styleUrl: './player.scss',
|
|
132
138
|
imports: [
|
|
133
|
-
EvaActiveChapter,
|
|
134
|
-
EvaBackward,
|
|
135
139
|
EvaBuffering,
|
|
136
|
-
EvaOverlayPlay,
|
|
137
140
|
EvaControlsContainer,
|
|
138
141
|
EvaControlsDivider,
|
|
139
|
-
EvaForward,
|
|
140
142
|
EvaFullscreen,
|
|
141
|
-
EvaHlsDirective,
|
|
142
143
|
EvaMute,
|
|
143
|
-
|
|
144
|
+
EvaOverlayPlay,
|
|
144
145
|
EvaPlayer,
|
|
145
146
|
EvaPlayPause,
|
|
146
|
-
EvaPictureInPicture,
|
|
147
|
-
EvaQualitySelector,
|
|
148
147
|
EvaScrubBar,
|
|
149
148
|
EvaScrubBarBufferingTime,
|
|
150
149
|
EvaScrubBarCurrentTime,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
]
|
|
150
|
+
EvaTimeDisplay,
|
|
151
|
+
EvaUserInteractionEventsDirective,
|
|
152
|
+
EvaVolume,
|
|
153
|
+
],
|
|
156
154
|
})
|
|
157
|
-
export class
|
|
155
|
+
export class PlayerComponent {
|
|
156
|
+
protected readonly sources = signal<EvaVideoSource[]>([
|
|
157
|
+
{ type: 'video/mp4', src: '/video.mp4' },
|
|
158
|
+
]);
|
|
159
|
+
}
|
|
160
|
+
```
|
|
158
161
|
|
|
162
|
+
See [Simple Example](documentation/example-simple.md) and [Full-Featured Example](documentation/example-configuration.md) for complete usage.
|
|
163
|
+
|
|
164
|
+
## Development
|
|
165
|
+
|
|
166
|
+
### Linting
|
|
167
|
+
|
|
168
|
+
The project uses a strict ESLint configuration with type-aware TypeScript rules and Angular-specific template rules. All available rule presets are enabled.
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
npm run lint # Check for errors
|
|
172
|
+
npx ng lint --fix # Auto-fix fixable errors
|
|
159
173
|
```
|
|
160
174
|
|
|
175
|
+
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.
|
|
176
|
+
|
|
161
177
|
## Components
|
|
162
178
|
|
|
163
|
-
Library has four groups of components.
|
|
164
|
-
- [**EvaCore**](documentation/core) – Main player component, directives, and providers
|
|
165
|
-
- [**EvaControls**](documentation/controls) – Video control components and
|
|
179
|
+
Library has four groups of components. Click on the name to go to the documentation:
|
|
180
|
+
- [**EvaCore**](documentation/core) – Main player component, directives (keyboard shortcuts, configuration storage), and providers
|
|
181
|
+
- [**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)
|
|
166
182
|
- [**EvaBuffering**](documentation/buffering) – Loading and buffering indicators
|
|
167
|
-
- [**EvaStreaming**](documentation/streaming) – Directives for live streaming support
|
|
183
|
+
- [**EvaStreaming**](documentation/streaming) – Directives for HLS and DASH live streaming support
|
|
168
184
|
|
|
169
185
|
---
|
|
170
186
|
### 💖 Support This Project
|
|
@@ -108,3 +108,20 @@
|
|
|
108
108
|
--eva-volume-knob-size: 15px;
|
|
109
109
|
--eva-volume-knob-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
.eva-cinema-backdrop {
|
|
113
|
+
position: fixed;
|
|
114
|
+
top: 0;
|
|
115
|
+
left: 0;
|
|
116
|
+
width: 100vw;
|
|
117
|
+
height: 100vh;
|
|
118
|
+
z-index: var(--eva-cinema-backdrop-z-index, 999);
|
|
119
|
+
background: var(--eva-cinema-backdrop-background, rgba(0, 0, 0, 0.7));
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
animation: eva-cinema-backdrop-fade-in var(--eva-transition-duration, 0.25s) ease forwards;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@keyframes eva-cinema-backdrop-fade-in {
|
|
125
|
+
from { opacity: 0; }
|
|
126
|
+
to { opacity: 1; }
|
|
127
|
+
}
|