@shival99/z-ui 2.0.30 → 2.0.32

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.
Files changed (43) hide show
  1. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +294 -7
  2. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
  3. package/fesm2022/shival99-z-ui-components-z-chat.mjs +1 -1
  4. package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
  5. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +11 -3
  6. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
  7. package/fesm2022/shival99-z-ui-components-z-editor.mjs +42 -24
  8. package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
  9. package/fesm2022/shival99-z-ui-components-z-gallery.mjs +455 -530
  10. package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
  11. package/fesm2022/shival99-z-ui-components-z-kanban.mjs +1 -1
  12. package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
  13. package/fesm2022/shival99-z-ui-components-z-media-player.mjs +658 -0
  14. package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -0
  15. package/fesm2022/shival99-z-ui-components-z-modal.mjs +11 -3
  16. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
  17. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +383 -0
  18. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -0
  19. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +131 -0
  20. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -0
  21. package/fesm2022/shival99-z-ui-components-z-show-more.mjs +121 -0
  22. package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -0
  23. package/fesm2022/shival99-z-ui-components-z-table.mjs +184 -71
  24. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
  25. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +135 -61
  26. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
  27. package/fesm2022/shival99-z-ui-components-z-toast.mjs +124 -31
  28. package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
  29. package/fesm2022/shival99-z-ui-i18n.mjs +70 -0
  30. package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
  31. package/package.json +17 -1
  32. package/types/shival99-z-ui-components-z-calendar.d.ts +6 -1
  33. package/types/shival99-z-ui-components-z-drawer.d.ts +9 -1
  34. package/types/shival99-z-ui-components-z-editor.d.ts +14 -9
  35. package/types/shival99-z-ui-components-z-gallery.d.ts +97 -6
  36. package/types/shival99-z-ui-components-z-media-player.d.ts +123 -0
  37. package/types/shival99-z-ui-components-z-modal.d.ts +10 -2
  38. package/types/shival99-z-ui-components-z-qrcode.d.ts +76 -0
  39. package/types/shival99-z-ui-components-z-scrollarea.d.ts +46 -0
  40. package/types/shival99-z-ui-components-z-show-more.d.ts +36 -0
  41. package/types/shival99-z-ui-components-z-table.d.ts +17 -2
  42. package/types/shival99-z-ui-components-z-tabs.d.ts +10 -6
  43. package/types/shival99-z-ui-components-z-toast.d.ts +35 -2
@@ -0,0 +1,658 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, ElementRef, input, output, viewChild, signal, computed, effect, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import * as i1 from '@angular/forms';
5
+ import { FormsModule } from '@angular/forms';
6
+ import { TranslatePipe } from '@ngx-translate/core';
7
+ import { ZButtonComponent } from '@shival99/z-ui/components/z-button';
8
+ import { ZIconComponent } from '@shival99/z-ui/components/z-icon';
9
+ import { ZPopoverDirective } from '@shival99/z-ui/components/z-popover';
10
+ import { zMergeClasses } from '@shival99/z-ui/utils';
11
+ import { cva } from 'class-variance-authority';
12
+
13
+ const zMediaPlayerVariants = cva('relative overflow-hidden bg-black select-none transition-all duration-300 w-full flex flex-col justify-center items-center group/player outline-none', {
14
+ variants: {
15
+ zLayout: {
16
+ default: 'aspect-video rounded-md shadow-md max-w-5xl mx-auto',
17
+ theater: 'w-full aspect-[21/9] max-w-full',
18
+ fullscreen: 'fixed inset-0 w-screen h-screen z-[9999] rounded-none max-w-full aspect-none',
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ zLayout: 'default',
23
+ },
24
+ });
25
+
26
+ class ZMediaPlayerComponent {
27
+ _elementRef = inject((ElementRef));
28
+ // Inputs
29
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
30
+ zSrc = input.required(...(ngDevMode ? [{ debugName: "zSrc" }] : []));
31
+ zSources = input([], ...(ngDevMode ? [{ debugName: "zSources" }] : []));
32
+ zPoster = input('', ...(ngDevMode ? [{ debugName: "zPoster" }] : []));
33
+ zAutoplay = input(false, ...(ngDevMode ? [{ debugName: "zAutoplay" }] : []));
34
+ zLoop = input(false, ...(ngDevMode ? [{ debugName: "zLoop" }] : []));
35
+ zMuted = input(false, ...(ngDevMode ? [{ debugName: "zMuted" }] : []));
36
+ zVolume = input(1.0, ...(ngDevMode ? [{ debugName: "zVolume" }] : []));
37
+ zSubtitles = input([], ...(ngDevMode ? [{ debugName: "zSubtitles" }] : []));
38
+ // Outputs
39
+ zPlay = output();
40
+ zTimeUpdate = output();
41
+ zVolumeChange = output();
42
+ zFullscreenChange = output();
43
+ zTheaterModeChange = output();
44
+ zMiniplayerChange = output();
45
+ zQualityChange = output();
46
+ // Element Refs sử dụng signal viewChild thay vì decorator
47
+ videoElement = viewChild('videoElement', ...(ngDevMode ? [{ debugName: "videoElement" }] : []));
48
+ timelineContainer = viewChild('timelineContainer', ...(ngDevMode ? [{ debugName: "timelineContainer" }] : []));
49
+ // Component Signals trạng thái trình phát
50
+ isPlaying = signal(false, ...(ngDevMode ? [{ debugName: "isPlaying" }] : []));
51
+ currentTime = signal(0, ...(ngDevMode ? [{ debugName: "currentTime" }] : []));
52
+ duration = signal(0, ...(ngDevMode ? [{ debugName: "duration" }] : []));
53
+ volume = signal(1.0, ...(ngDevMode ? [{ debugName: "volume" }] : []));
54
+ isMuted = signal(false, ...(ngDevMode ? [{ debugName: "isMuted" }] : []));
55
+ playbackSpeed = signal(1.0, ...(ngDevMode ? [{ debugName: "playbackSpeed" }] : []));
56
+ activeSourceSrc = signal(null, ...(ngDevMode ? [{ debugName: "activeSourceSrc" }] : []));
57
+ showControls = signal(true, ...(ngDevMode ? [{ debugName: "showControls" }] : []));
58
+ isBuffering = signal(false, ...(ngDevMode ? [{ debugName: "isBuffering" }] : []));
59
+ captionsEnabled = signal(false, ...(ngDevMode ? [{ debugName: "captionsEnabled" }] : []));
60
+ isTheaterMode = signal(false, ...(ngDevMode ? [{ debugName: "isTheaterMode" }] : []));
61
+ isFullscreen = signal(false, ...(ngDevMode ? [{ debugName: "isFullscreen" }] : []));
62
+ isMiniplayer = signal(false, ...(ngDevMode ? [{ debugName: "isMiniplayer" }] : []));
63
+ showSettings = signal(false, ...(ngDevMode ? [{ debugName: "showSettings" }] : []));
64
+ settingsPanel = signal('main', ...(ngDevMode ? [{ debugName: "settingsPanel" }] : []));
65
+ isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : []));
66
+ // Tiến trình đệm và phát
67
+ bufferedProgress = signal(0, ...(ngDevMode ? [{ debugName: "bufferedProgress" }] : []));
68
+ progress = computed(() => {
69
+ const dur = this.duration();
70
+ if (dur === 0) {
71
+ return 0;
72
+ }
73
+ return (this.currentTime() / dur) * 100;
74
+ }, ...(ngDevMode ? [{ debugName: "progress" }] : []));
75
+ // Trạng thái visual hiển thị
76
+ playPauseFlash = signal(null, ...(ngDevMode ? [{ debugName: "playPauseFlash" }] : []));
77
+ hoverTimeLabel = signal(null, ...(ngDevMode ? [{ debugName: "hoverTimeLabel" }] : []));
78
+ hoverX = signal(0, ...(ngDevMode ? [{ debugName: "hoverX" }] : []));
79
+ // Lớp phủ tua nhanh nhảy số cộng dồn kiểu YouTube
80
+ skipOverlayDirection = signal(null, ...(ngDevMode ? [{ debugName: "skipOverlayDirection" }] : []));
81
+ skipOverlayValue = signal(0, ...(ngDevMode ? [{ debugName: "skipOverlayValue" }] : []));
82
+ skipOverlayPulse = signal(0, ...(ngDevMode ? [{ debugName: "skipOverlayPulse" }] : []));
83
+ // Kiểm tra trình duyệt hỗ trợ Picture-in-Picture
84
+ isPiPSupported = computed(() => {
85
+ if (typeof document === 'undefined') {
86
+ return false;
87
+ }
88
+ const doc = document;
89
+ const hasPiP = doc.pictureInPictureEnabled;
90
+ const hasRequestPiP = typeof HTMLVideoElement !== 'undefined' && 'requestPictureInPicture' in HTMLVideoElement.prototype;
91
+ if (hasPiP && hasRequestPiP) {
92
+ return true;
93
+ }
94
+ const video = this.videoElement()?.nativeElement;
95
+ if (video) {
96
+ const hasWebkit = 'webkitSupportsPresentationMode' in video &&
97
+ typeof video.webkitSupportsPresentationMode === 'function' &&
98
+ video.webkitSupportsPresentationMode('picture-in-picture');
99
+ return !!hasWebkit;
100
+ }
101
+ const hasWebkitProto = typeof HTMLVideoElement !== 'undefined' &&
102
+ 'webkitSupportsPresentationMode' in HTMLVideoElement.prototype &&
103
+ 'webkitSetPresentationMode' in HTMLVideoElement.prototype;
104
+ return hasWebkitProto;
105
+ }, ...(ngDevMode ? [{ debugName: "isPiPSupported" }] : []));
106
+ // Danh sách các tốc độ phát video
107
+ playbackSpeeds = [
108
+ { label: '0.25x', value: 0.25 },
109
+ { label: '0.5x', value: 0.5 },
110
+ { label: '0.75x', value: 0.75 },
111
+ { label: 'i18n_z_ui_media_player_normal', value: 1.0 },
112
+ { label: '1.25x', value: 1.25 },
113
+ { label: '1.5x', value: 1.5 },
114
+ { label: '2.0x', value: 2.0 },
115
+ ];
116
+ // Lưu trữ Timer ẩn thanh điều khiển và điều hướng
117
+ _controlsTimeout = null;
118
+ _flashTimeout = null;
119
+ _skipOverlayTimeout = null;
120
+ _clickTimeout = null;
121
+ _accumulatedSkip = 0;
122
+ // Cập nhật CVA class dựa trên các trạng thái giao diện
123
+ zClasses = computed(() => {
124
+ let layout = 'default';
125
+ if (this.isTheaterMode()) {
126
+ layout = 'theater';
127
+ }
128
+ if (this.isFullscreen()) {
129
+ layout = 'fullscreen';
130
+ }
131
+ return zMergeClasses(zMediaPlayerVariants({ zLayout: layout }), this.class());
132
+ }, ...(ngDevMode ? [{ debugName: "zClasses" }] : []));
133
+ // Nhãn thời gian hiển thị computed signals
134
+ currentTimeLabel = computed(() => this._formatTime(this.currentTime()), ...(ngDevMode ? [{ debugName: "currentTimeLabel" }] : []));
135
+ durationLabel = computed(() => this._formatTime(this.duration()), ...(ngDevMode ? [{ debugName: "durationLabel" }] : []));
136
+ effectiveSrc = computed(() => this.activeSourceSrc() ?? this.zSrc(), ...(ngDevMode ? [{ debugName: "effectiveSrc" }] : []));
137
+ qualitySources = computed(() => this.zSources().filter(source => !!source.src), ...(ngDevMode ? [{ debugName: "qualitySources" }] : []));
138
+ activeQualityLabel = computed(() => {
139
+ const activeSrc = this.effectiveSrc();
140
+ return this.qualitySources().find(source => source.src === activeSrc)?.label ?? 'Auto';
141
+ }, ...(ngDevMode ? [{ debugName: "activeQualityLabel" }] : []));
142
+ constructor() {
143
+ effect(() => {
144
+ const fallbackSrc = this.zSrc();
145
+ const sources = this.qualitySources();
146
+ const currentSrc = this.activeSourceSrc();
147
+ if (currentSrc && (currentSrc === fallbackSrc || sources.some(source => source.src === currentSrc))) {
148
+ return;
149
+ }
150
+ this.activeSourceSrc.set(sources[0]?.src ?? fallbackSrc);
151
+ });
152
+ effect(() => {
153
+ const src = this.effectiveSrc();
154
+ const video = this.videoElement()?.nativeElement;
155
+ if (video) {
156
+ if (video.src !== src) {
157
+ video.src = src;
158
+ }
159
+ video.load();
160
+ }
161
+ });
162
+ afterNextRender(() => {
163
+ this._initializeVideoState();
164
+ });
165
+ }
166
+ ngOnDestroy() {
167
+ if (this._controlsTimeout) {
168
+ clearTimeout(this._controlsTimeout);
169
+ }
170
+ if (this._flashTimeout) {
171
+ clearTimeout(this._flashTimeout);
172
+ }
173
+ if (this._skipOverlayTimeout) {
174
+ clearTimeout(this._skipOverlayTimeout);
175
+ }
176
+ if (this._clickTimeout) {
177
+ clearTimeout(this._clickTimeout);
178
+ }
179
+ }
180
+ // Khởi tạo trạng thái âm lượng và tắt tiếng khi bắt đầu render
181
+ _initializeVideoState() {
182
+ const video = this.videoElement()?.nativeElement;
183
+ if (!video) {
184
+ return;
185
+ }
186
+ video.volume = this.zVolume();
187
+ this.volume.set(this.zVolume());
188
+ video.muted = this.zMuted();
189
+ this.isMuted.set(this.zMuted());
190
+ this._resetControlsTimer();
191
+ }
192
+ // Thay đổi trạng thái Phát / Tạm dừng
193
+ togglePlay() {
194
+ const video = this.videoElement()?.nativeElement;
195
+ if (!video) {
196
+ return;
197
+ }
198
+ if (video.paused) {
199
+ video.play().catch(console.error);
200
+ this._triggerFlashIcon('play');
201
+ return;
202
+ }
203
+ video.pause();
204
+ this._triggerFlashIcon('pause');
205
+ }
206
+ // Kích hoạt flash icon giữa màn hình
207
+ _triggerFlashIcon(type) {
208
+ if (this._flashTimeout) {
209
+ clearTimeout(this._flashTimeout);
210
+ }
211
+ this.playPauseFlash.set(type);
212
+ this._flashTimeout = setTimeout(() => {
213
+ this.playPauseFlash.set(null);
214
+ }, 500);
215
+ }
216
+ // Bật / tắt tiếng (Mute)
217
+ toggleMute() {
218
+ const video = this.videoElement()?.nativeElement;
219
+ if (!video) {
220
+ return;
221
+ }
222
+ const nextMuted = !video.muted;
223
+ video.muted = nextMuted;
224
+ this.isMuted.set(nextMuted);
225
+ this.zVolumeChange.emit(nextMuted ? 0 : this.volume());
226
+ }
227
+ // Điều chỉnh mức âm lượng từ slider
228
+ onVolumeChange(val) {
229
+ const video = this.videoElement()?.nativeElement;
230
+ if (!video) {
231
+ return;
232
+ }
233
+ video.volume = val;
234
+ this.volume.set(val);
235
+ const isSilent = val === 0;
236
+ video.muted = isSilent;
237
+ this.isMuted.set(isSilent);
238
+ this.zVolumeChange.emit(val);
239
+ }
240
+ // Đặt tốc độ phát video
241
+ setPlaybackSpeed(speed) {
242
+ const video = this.videoElement()?.nativeElement;
243
+ if (!video) {
244
+ return;
245
+ }
246
+ video.playbackRate = speed;
247
+ this.playbackSpeed.set(speed);
248
+ this.closeSettingsPanel();
249
+ }
250
+ openSettingsPanel(panel) {
251
+ this.settingsPanel.set(panel);
252
+ }
253
+ closeSettingsPanel() {
254
+ this.settingsPanel.set('main');
255
+ }
256
+ onSettingsHidden() {
257
+ this.showSettings.set(false);
258
+ this.closeSettingsPanel();
259
+ this.onMouseMove();
260
+ }
261
+ setQualitySource(source) {
262
+ if (source.src === this.effectiveSrc()) {
263
+ this.closeSettingsPanel();
264
+ return;
265
+ }
266
+ const video = this.videoElement()?.nativeElement;
267
+ const current = video?.currentTime ?? this.currentTime();
268
+ const shouldResume = !!video && !video.paused;
269
+ const playbackRate = video?.playbackRate ?? this.playbackSpeed();
270
+ if (video) {
271
+ let didResume = false;
272
+ const restorePosition = () => {
273
+ const safeTime = Number.isFinite(video.duration) ? Math.min(current, video.duration) : current;
274
+ video.playbackRate = playbackRate;
275
+ video.currentTime = safeTime;
276
+ this.currentTime.set(safeTime);
277
+ if (shouldResume && !didResume) {
278
+ didResume = true;
279
+ video.play().catch(console.error);
280
+ }
281
+ };
282
+ video.addEventListener('loadedmetadata', restorePosition, { once: true });
283
+ video.addEventListener('loadeddata', restorePosition, { once: true });
284
+ }
285
+ this.activeSourceSrc.set(source.src);
286
+ this.bufferedProgress.set(0);
287
+ this.zQualityChange.emit(source);
288
+ this.closeSettingsPanel();
289
+ }
290
+ // Tua đến mốc thời gian chỉ định
291
+ seekTo(time) {
292
+ const video = this.videoElement()?.nativeElement;
293
+ if (!video) {
294
+ return;
295
+ }
296
+ video.currentTime = time;
297
+ this.currentTime.set(time);
298
+ }
299
+ // Bật/tắt chế độ rạp phim (Theater Mode)
300
+ toggleTheaterMode() {
301
+ if (this.isFullscreen()) {
302
+ return;
303
+ }
304
+ const nextState = !this.isTheaterMode();
305
+ this.isTheaterMode.set(nextState);
306
+ this.zTheaterModeChange.emit(nextState);
307
+ }
308
+ // Bật/tắt chế độ toàn màn hình
309
+ toggleFullscreen() {
310
+ const wrapper = this._elementRef.nativeElement;
311
+ if (!wrapper) {
312
+ return;
313
+ }
314
+ if (document.fullscreenElement) {
315
+ document.exitFullscreen().catch(console.error);
316
+ return;
317
+ }
318
+ wrapper.requestFullscreen().catch(console.error);
319
+ }
320
+ // Lắng nghe sự kiện thay đổi fullscreen (liên kết qua host property của component)
321
+ onFullscreenStateChange() {
322
+ const isFull = !!document.fullscreenElement;
323
+ this.isFullscreen.set(isFull);
324
+ this.zFullscreenChange.emit(isFull);
325
+ }
326
+ // Trình phát thu nhỏ (Picture-in-Picture)
327
+ async toggleMiniplayer() {
328
+ const video = this.videoElement()?.nativeElement;
329
+ if (!video) {
330
+ return;
331
+ }
332
+ try {
333
+ const doc = document;
334
+ if (doc.pictureInPictureEnabled && typeof video.requestPictureInPicture === 'function') {
335
+ if (doc.pictureInPictureElement) {
336
+ await doc.exitPictureInPicture();
337
+ this.isMiniplayer.set(false);
338
+ this.zMiniplayerChange.emit(false);
339
+ return;
340
+ }
341
+ await video.requestPictureInPicture();
342
+ this.isMiniplayer.set(true);
343
+ this.zMiniplayerChange.emit(true);
344
+ return;
345
+ }
346
+ const webkitVideo = video;
347
+ if ('webkitSupportsPresentationMode' in webkitVideo &&
348
+ typeof webkitVideo.webkitSupportsPresentationMode === 'function' &&
349
+ webkitVideo.webkitSupportsPresentationMode('picture-in-picture')) {
350
+ const currentMode = webkitVideo.webkitPresentationMode;
351
+ const targetMode = currentMode === 'picture-in-picture' ? 'inline' : 'picture-in-picture';
352
+ webkitVideo.webkitSetPresentationMode(targetMode);
353
+ const isPiP = targetMode === 'picture-in-picture';
354
+ this.isMiniplayer.set(isPiP);
355
+ this.zMiniplayerChange.emit(isPiP);
356
+ }
357
+ }
358
+ catch (err) {
359
+ console.warn('Picture-in-Picture API error: ', err);
360
+ }
361
+ }
362
+ onEnterPiP() {
363
+ this.isMiniplayer.set(true);
364
+ this.zMiniplayerChange.emit(true);
365
+ }
366
+ onLeavePiP() {
367
+ this.isMiniplayer.set(false);
368
+ this.zMiniplayerChange.emit(false);
369
+ }
370
+ onWebkitPresentationModeChanged() {
371
+ const video = this.videoElement()?.nativeElement;
372
+ if (video) {
373
+ const isPiP = video.webkitPresentationMode === 'picture-in-picture';
374
+ this.isMiniplayer.set(isPiP);
375
+ this.zMiniplayerChange.emit(isPiP);
376
+ }
377
+ }
378
+ // Bật/tắt hiển thị phụ đề (CC)
379
+ toggleSubtitles() {
380
+ const video = this.videoElement()?.nativeElement;
381
+ if (!video) {
382
+ return;
383
+ }
384
+ const tracks = video.textTracks;
385
+ const currentEnabled = this.captionsEnabled();
386
+ const targetState = !currentEnabled;
387
+ this.captionsEnabled.set(targetState);
388
+ let i = 0;
389
+ while (i < tracks.length) {
390
+ tracks[i].mode = targetState ? 'showing' : 'disabled';
391
+ i++;
392
+ }
393
+ }
394
+ // Cập nhật trạng thái khi video phát/dừng
395
+ onPlayStateChange(playing) {
396
+ this.isPlaying.set(playing);
397
+ this.zPlay.emit(playing);
398
+ this._resetControlsTimer();
399
+ }
400
+ // Cập nhật mốc thời gian phát
401
+ onTimeUpdate() {
402
+ const video = this.videoElement()?.nativeElement;
403
+ if (!video || this.isDragging()) {
404
+ return;
405
+ }
406
+ this.currentTime.set(video.currentTime);
407
+ this.zTimeUpdate.emit(video.currentTime);
408
+ this.updateBufferedProgress();
409
+ }
410
+ onDurationChange() {
411
+ const video = this.videoElement()?.nativeElement;
412
+ if (!video) {
413
+ return;
414
+ }
415
+ this.duration.set(video.duration);
416
+ }
417
+ onSeeking(seeking) {
418
+ this.isBuffering.set(seeking);
419
+ }
420
+ updateBufferedProgress() {
421
+ const video = this.videoElement()?.nativeElement;
422
+ if (!video || video.buffered.length === 0 || this.duration() === 0) {
423
+ return;
424
+ }
425
+ const end = video.buffered.end(video.buffered.length - 1);
426
+ this.bufferedProgress.set((end / this.duration()) * 100);
427
+ }
428
+ // Bắt đầu kéo thanh timeline phát
429
+ onTimelineDragStart(event) {
430
+ event.preventDefault();
431
+ this.isDragging.set(true);
432
+ this._updateTimeFromCoords(event);
433
+ const moveHandler = (moveEvent) => {
434
+ this._updateTimeFromCoords(moveEvent);
435
+ };
436
+ const upHandler = () => {
437
+ this.isDragging.set(false);
438
+ document.removeEventListener('mousemove', moveHandler);
439
+ document.removeEventListener('mouseup', upHandler);
440
+ this._resetControlsTimer();
441
+ };
442
+ document.addEventListener('mousemove', moveHandler);
443
+ document.addEventListener('mouseup', upHandler);
444
+ }
445
+ onTimelineHover(event) {
446
+ const container = this.timelineContainer()?.nativeElement;
447
+ if (!container) {
448
+ return;
449
+ }
450
+ const rect = container.getBoundingClientRect();
451
+ const offsetX = event.clientX - rect.left;
452
+ this.hoverX.set(offsetX);
453
+ const ratio = Math.max(0, Math.min(1, offsetX / rect.width));
454
+ const hoverTime = ratio * this.duration();
455
+ this.hoverTimeLabel.set(this._formatTime(hoverTime));
456
+ }
457
+ onTimelineHoverEnd() {
458
+ this.hoverTimeLabel.set(null);
459
+ }
460
+ _updateTimeFromCoords(event) {
461
+ const container = this.timelineContainer()?.nativeElement;
462
+ if (!container) {
463
+ return;
464
+ }
465
+ const rect = container.getBoundingClientRect();
466
+ const offsetX = event.clientX - rect.left;
467
+ const { width } = rect;
468
+ let ratio = offsetX / width;
469
+ if (ratio < 0) {
470
+ ratio = 0;
471
+ }
472
+ if (ratio > 1) {
473
+ ratio = 1;
474
+ }
475
+ const targetTime = ratio * this.duration();
476
+ const video = this.videoElement()?.nativeElement;
477
+ if (video) {
478
+ video.currentTime = targetTime;
479
+ this.currentTime.set(targetTime);
480
+ }
481
+ }
482
+ // Tải lại bộ đếm thời gian ẩn controls
483
+ onMouseMove() {
484
+ this._resetControlsTimer();
485
+ }
486
+ onMouseLeave() {
487
+ const video = this.videoElement()?.nativeElement;
488
+ if (video && !video.paused && !this.isDragging() && !this.showSettings()) {
489
+ this.showControls.set(false);
490
+ }
491
+ }
492
+ _resetControlsTimer() {
493
+ this.showControls.set(true);
494
+ if (this._controlsTimeout) {
495
+ clearTimeout(this._controlsTimeout);
496
+ }
497
+ const video = this.videoElement()?.nativeElement;
498
+ if (video && !video.paused && !this.showSettings() && !this.isDragging()) {
499
+ this._controlsTimeout = setTimeout(() => {
500
+ this.showControls.set(false);
501
+ }, 3000);
502
+ }
503
+ }
504
+ // Xử lý sự kiện click phân biệt Single-click và Double-click
505
+ onVideoClick(event) {
506
+ if (this._clickTimeout) {
507
+ clearTimeout(this._clickTimeout);
508
+ this._clickTimeout = null;
509
+ this._handleVideoDoubleClick(event);
510
+ return;
511
+ }
512
+ this._clickTimeout = setTimeout(() => {
513
+ this._clickTimeout = null;
514
+ this.togglePlay();
515
+ }, 250);
516
+ }
517
+ _handleVideoDoubleClick(event) {
518
+ const video = this.videoElement()?.nativeElement;
519
+ if (!video) {
520
+ return;
521
+ }
522
+ const rect = video.getBoundingClientRect();
523
+ const clickX = event.clientX - rect.left;
524
+ const isLeftHalf = clickX < rect.width / 2;
525
+ if (isLeftHalf) {
526
+ this.seekTo(Math.max(0, video.currentTime - 10));
527
+ this._triggerSkipOverlay(10, 'left');
528
+ return;
529
+ }
530
+ this.seekTo(Math.min(this.duration(), video.currentTime + 10));
531
+ this._triggerSkipOverlay(10, 'right');
532
+ }
533
+ // Kích hoạt overlay tua nhanh cộng dồn
534
+ triggerSkip(seconds, direction) {
535
+ const video = this.videoElement()?.nativeElement;
536
+ if (!video) {
537
+ return;
538
+ }
539
+ if (direction === 'left') {
540
+ this.seekTo(Math.max(0, video.currentTime - seconds));
541
+ }
542
+ if (direction === 'right') {
543
+ this.seekTo(Math.min(this.duration(), video.currentTime + seconds));
544
+ }
545
+ this._triggerSkipOverlay(seconds, direction);
546
+ }
547
+ _triggerSkipOverlay(seconds, direction) {
548
+ if (this._skipOverlayTimeout) {
549
+ clearTimeout(this._skipOverlayTimeout);
550
+ }
551
+ this._accumulatedSkip += Math.abs(seconds);
552
+ this.skipOverlayDirection.set(direction);
553
+ this.skipOverlayValue.set(this._accumulatedSkip);
554
+ this.skipOverlayPulse.update(value => value + 1);
555
+ this._skipOverlayTimeout = setTimeout(() => {
556
+ this.skipOverlayDirection.set(null);
557
+ this.skipOverlayValue.set(0);
558
+ this._accumulatedSkip = 0;
559
+ }, 800);
560
+ }
561
+ // Bắt sự kiện phím tắt điều khiển
562
+ onKeyDown(event) {
563
+ const activeEl = document.activeElement;
564
+ if (activeEl &&
565
+ (activeEl.tagName === 'INPUT' || activeEl.tagName === 'TEXTAREA' || activeEl.hasAttribute('contenteditable'))) {
566
+ return;
567
+ }
568
+ const video = this.videoElement()?.nativeElement;
569
+ if (!video) {
570
+ return;
571
+ }
572
+ const key = event.key.toLowerCase();
573
+ if (key === ' ' || key === 'arrowup' || key === 'arrowdown' || key === 'arrowleft' || key === 'arrowright') {
574
+ event.preventDefault();
575
+ }
576
+ if (key === ' ' || key === 'k') {
577
+ this.togglePlay();
578
+ return;
579
+ }
580
+ if (key === 'm') {
581
+ this.toggleMute();
582
+ return;
583
+ }
584
+ if (key === 'f') {
585
+ this.toggleFullscreen();
586
+ return;
587
+ }
588
+ if (key === 't') {
589
+ this.toggleTheaterMode();
590
+ return;
591
+ }
592
+ if (key === 'i') {
593
+ void this.toggleMiniplayer();
594
+ return;
595
+ }
596
+ if (key === 'arrowleft' || key === 'j') {
597
+ const skipSec = key === 'j' ? 10 : 5;
598
+ this.triggerSkip(skipSec, 'left');
599
+ return;
600
+ }
601
+ if (key === 'arrowright' || key === 'l') {
602
+ const skipSec = key === 'l' ? 10 : 5;
603
+ this.triggerSkip(skipSec, 'right');
604
+ return;
605
+ }
606
+ if (key === 'arrowup') {
607
+ this.onVolumeChange(Math.min(1.0, this.volume() + 0.05));
608
+ return;
609
+ }
610
+ if (key === 'arrowdown') {
611
+ this.onVolumeChange(Math.max(0, this.volume() - 0.05));
612
+ return;
613
+ }
614
+ if (event.key >= '0' && event.key <= '9') {
615
+ const numPercent = Number(event.key) * 10;
616
+ this.seekTo((numPercent / 100) * this.duration());
617
+ return;
618
+ }
619
+ }
620
+ toggleSettings() {
621
+ this.showSettings.set(!this.showSettings());
622
+ }
623
+ // Định dạng hiển thị m:ss / h:mm:ss
624
+ _formatTime(time) {
625
+ if (Number.isNaN(time) || time === Infinity || time < 0) {
626
+ return '0:00';
627
+ }
628
+ const hours = Math.floor(time / 3600);
629
+ const minutes = Math.floor((time % 3600) / 60);
630
+ const seconds = Math.floor(time % 60);
631
+ const formattedSeconds = seconds < 10 ? `0${seconds}` : seconds;
632
+ if (hours > 0) {
633
+ const formattedMinutes = minutes < 10 ? `0${minutes}` : minutes;
634
+ return `${hours}:${formattedMinutes}:${formattedSeconds}`;
635
+ }
636
+ return `${minutes}:${formattedSeconds}`;
637
+ }
638
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZMediaPlayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
639
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZMediaPlayerComponent, isStandalone: true, selector: "z-media-player", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zSrc: { classPropertyName: "zSrc", publicName: "zSrc", isSignal: true, isRequired: true, transformFunction: null }, zSources: { classPropertyName: "zSources", publicName: "zSources", isSignal: true, isRequired: false, transformFunction: null }, zPoster: { classPropertyName: "zPoster", publicName: "zPoster", isSignal: true, isRequired: false, transformFunction: null }, zAutoplay: { classPropertyName: "zAutoplay", publicName: "zAutoplay", isSignal: true, isRequired: false, transformFunction: null }, zLoop: { classPropertyName: "zLoop", publicName: "zLoop", isSignal: true, isRequired: false, transformFunction: null }, zMuted: { classPropertyName: "zMuted", publicName: "zMuted", isSignal: true, isRequired: false, transformFunction: null }, zVolume: { classPropertyName: "zVolume", publicName: "zVolume", isSignal: true, isRequired: false, transformFunction: null }, zSubtitles: { classPropertyName: "zSubtitles", publicName: "zSubtitles", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zPlay: "zPlay", zTimeUpdate: "zTimeUpdate", zVolumeChange: "zVolumeChange", zFullscreenChange: "zFullscreenChange", zTheaterModeChange: "zTheaterModeChange", zMiniplayerChange: "zMiniplayerChange", zQualityChange: "zQualityChange" }, host: { listeners: { "keydown": "onKeyDown($event)", "mousemove": "onMouseMove()", "mouseleave": "onMouseLeave()", "document:fullscreenchange": "onFullscreenStateChange()" }, properties: { "class": "zClasses()", "attr.tabindex": "0" } }, viewQueries: [{ propertyName: "videoElement", first: true, predicate: ["videoElement"], descendants: true, isSignal: true }, { propertyName: "timelineContainer", first: true, predicate: ["timelineContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Th\u1EBB video ch\u00EDnh ph\u00E1t ngu\u1ED3n zSrc -->\n<video\n #videoElement\n class=\"h-full w-full cursor-pointer object-contain\"\n [src]=\"effectiveSrc()\"\n [poster]=\"zPoster()\"\n [loop]=\"zLoop()\"\n [autoplay]=\"zAutoplay()\"\n playsinline\n webkit-playsinline\n (click)=\"onVideoClick($event)\"\n (play)=\"onPlayStateChange(true)\"\n (pause)=\"onPlayStateChange(false)\"\n (timeupdate)=\"onTimeUpdate()\"\n (durationchange)=\"onDurationChange()\"\n (seeking)=\"onSeeking(true)\"\n (seeked)=\"onSeeking(false)\"\n (waiting)=\"onSeeking(true)\"\n (playing)=\"onSeeking(false)\"\n (enterpictureinpicture)=\"onEnterPiP()\"\n (leavepictureinpicture)=\"onLeavePiP()\"\n (webkitpresentationmodechanged)=\"onWebkitPresentationModeChanged()\">\n @for (sub of zSubtitles(); track sub.src) {\n <track\n [src]=\"sub.src\"\n kind=\"subtitles\"\n [srclang]=\"sub.srclang\"\n [label]=\"sub.label\"\n [default]=\"sub.default || false\" />\n }\n</video>\n\n<!-- L\u1EDBp ph\u1EE7 v\u00F2ng xoay loading khi video \u0111ang buffer -->\n@if (isBuffering()) {\n <div class=\"pointer-events-none absolute inset-0 z-[10] flex items-center justify-center bg-black/20\">\n <div class=\"size-14 animate-spin rounded-full border-4 border-white/20 border-t-red-600\"></div>\n </div>\n}\n\n<!-- Hi\u1EC7u \u1EE9ng nh\u1EA5p nh\u00E1y Play/Pause l\u1EDBn gi\u1EEFa m\u00E0n h\u00ECnh t\u01B0\u01A1ng t\u1EF1 YouTube -->\n@if (playPauseFlash()) {\n <div class=\"pointer-events-none absolute inset-0 z-[11] flex items-center justify-center\">\n <div\n class=\"z-flash-animation flex size-14 items-center justify-center rounded-full bg-black/60 text-white sm:size-20\">\n <z-icon [zType]=\"playPauseFlash() === 'play' ? 'lucidePlay' : 'lucidePause'\" zSize=\"24\" [zStrokeWidth]=\"2\" />\n </div>\n </div>\n}\n\n<!-- L\u1EDBp ph\u1EE7 tua nhanh nh\u1EA3y s\u1ED1 c\u1ED9ng d\u1ED3n Tr\u00E1i (YouTube style) -->\n@if (skipOverlayValue() > 0 && skipOverlayDirection() === 'left') {\n <div class=\"z-double-tap-ripple-left\" [class.z-skip-pulse-alt]=\"skipOverlayPulse() % 2 === 1\">\n <div class=\"z-skip-overlay-content\">\n <span class=\"z-skip-overlay-number\">- {{ skipOverlayValue() }}</span>\n <span class=\"z-skip-overlay-arrows z-chevron-slide-left\">\n <z-icon zType=\"lucideChevronsLeft\" zSize=\"26\" [zStrokeWidth]=\"2.4\" />\n </span>\n </div>\n </div>\n}\n\n<!-- L\u1EDBp ph\u1EE7 tua nhanh nh\u1EA3y s\u1ED1 c\u1ED9ng d\u1ED3n Ph\u1EA3i (YouTube style) -->\n@if (skipOverlayValue() > 0 && skipOverlayDirection() === 'right') {\n <div class=\"z-double-tap-ripple-right\" [class.z-skip-pulse-alt]=\"skipOverlayPulse() % 2 === 1\">\n <div class=\"z-skip-overlay-content\">\n <span class=\"z-skip-overlay-arrows z-chevron-slide-right\">\n <z-icon zType=\"lucideChevronsRight\" zSize=\"26\" [zStrokeWidth]=\"2.4\" />\n </span>\n <span class=\"z-skip-overlay-number\">+ {{ skipOverlayValue() }}</span>\n </div>\n </div>\n}\n\n<!-- L\u1EDBp ph\u1EE7 ch\u1EE9a thanh \u0111i\u1EC1u khi\u1EC3n (Bottom controls panel) -->\n<div\n class=\"pointer-events-none absolute inset-x-0 bottom-0 z-[12] flex flex-col bg-gradient-to-t from-black/85 via-black/40 to-transparent p-3 pt-12 transition-opacity duration-300 select-none\"\n [class.opacity-0]=\"!showControls()\"\n [class.invisible]=\"!showControls()\">\n <!-- Thanh Timeline (Progress Bar) t\u00F9y ch\u1EC9nh ki\u1EC3u YouTube -->\n <div\n #timelineContainer\n id=\"z_media_player_timeline\"\n class=\"group/timeline pointer-events-auto relative mb-3 flex h-1 w-full cursor-pointer items-center transition-all hover:h-1.5\"\n (mousedown)=\"onTimelineDragStart($event)\"\n (mousemove)=\"onTimelineHover($event)\"\n (mouseleave)=\"onTimelineHoverEnd()\">\n <!-- Thanh n\u1EC1n x\u00E1m c\u1EE7a thanh timeline -->\n <div\n class=\"absolute inset-x-0 h-1 overflow-hidden rounded-full bg-white/25 transition-all group-hover/timeline:h-1.5\">\n <!-- Ti\u1EBFn tr\u00ECnh t\u1EA3i buffer c\u1EE7a video -->\n <div class=\"absolute top-0 left-0 h-full rounded-full bg-white/30\" [style.width.%]=\"bufferedProgress()\"></div>\n <!-- Ti\u1EBFn tr\u00ECnh ph\u00E1t hi\u1EC7n t\u1EA1i c\u1EE7a video -->\n <div class=\"absolute top-0 left-0 h-full rounded-full bg-red-600\" [style.width.%]=\"progress()\"></div>\n </div>\n\n <!-- \u0110\u1EA7u k\u00E9o timeline (Thumb) \u0111\u1ECF ch\u1EC9 hi\u1EC3n th\u1ECB khi hover ho\u1EB7c k\u00E9o -->\n <div\n class=\"bg-red-650 pointer-events-none absolute size-3.5 -translate-x-1/2 scale-0 transform rounded-full opacity-0 transition-opacity duration-150 group-hover/timeline:scale-100 group-hover/timeline:opacity-100\"\n [style.left.%]=\"progress()\"></div>\n\n <!-- Tooltip hi\u1EC3n th\u1ECB m\u1ED1c th\u1EDDi gian khi hover -->\n @if (hoverTimeLabel()) {\n <div\n class=\"pointer-events-none absolute bottom-4 z-[20] -translate-x-1/2 rounded-xs bg-zinc-950/70 px-2 py-1 font-mono text-[11px] leading-none whitespace-nowrap text-zinc-100 shadow-[0_12px_24px_-10px_rgba(0,0,0,0.85)] backdrop-blur-2xl\"\n [style.left.px]=\"hoverX()\">\n {{ hoverTimeLabel() }}\n </div>\n }\n </div>\n\n <!-- H\u00E0ng ch\u1EE9a c\u00E1c n\u00FAt b\u1EA5m \u0111i\u1EC1u khi\u1EC3n ch\u1EE9c n\u0103ng -->\n <div class=\"pointer-events-auto flex items-center justify-between text-sm text-white\">\n <!-- C\u00E1c n\u00FAt \u0111i\u1EC1u khi\u1EC3n ph\u00EDa b\u00EAn tr\u00E1i -->\n <div class=\"flex items-center gap-2\">\n <!-- N\u00FAt Ph\u00E1t / T\u1EA1m d\u1EEBng -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_play_btn\"\n class=\"mr-1 flex size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none\"\n [title]=\"(isPlaying() ? 'i18n_z_ui_media_player_pause' : 'i18n_z_ui_media_player_play') | translate\"\n (click)=\"togglePlay()\">\n <z-icon [zType]=\"isPlaying() ? 'lucidePause' : 'lucidePlay'\" zSize=\"20\" [zStrokeWidth]=\"2\" />\n </button>\n\n <!-- N\u00FAt Tua l\u00F9i 5s -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_rewind_5_btn\"\n class=\"hidden size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none sm:flex\"\n title=\"Tua l\u00F9i 5 gi\u00E2y (Arrow Left)\"\n (click)=\"triggerSkip(5, 'left')\">\n <div class=\"relative flex items-center justify-center\">\n <z-icon zType=\"lucideRotateCcw\" zSize=\"18\" [zStrokeWidth]=\"2\" />\n <span class=\"pointer-events-none absolute mt-[1px] scale-75 text-[8px] font-bold text-white select-none\">\n 5\n </span>\n </div>\n </button>\n\n <!-- N\u00FAt Tua ti\u1EBFn 5s -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_forward_5_btn\"\n class=\"mr-1 hidden size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none sm:flex\"\n title=\"Tua ti\u1EBFn 5 gi\u00E2y (Arrow Right)\"\n (click)=\"triggerSkip(5, 'right')\">\n <div class=\"relative flex items-center justify-center\">\n <z-icon zType=\"lucideRotateCw\" zSize=\"18\" [zStrokeWidth]=\"2\" />\n <span class=\"pointer-events-none absolute mt-[1px] scale-75 text-[8px] font-bold text-white select-none\">\n 5\n </span>\n </div>\n </button>\n\n <!-- T\u1ED5 h\u1EE3p n\u00FAt Mute v\u00E0 Slider \u00E2m l\u01B0\u1EE3ng tr\u01B0\u1EE3t ngang -->\n <div class=\"group/volume hidden items-center gap-1.5 sm:flex\">\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_mute_btn\"\n class=\"flex size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none\"\n [title]=\"(isMuted() ? 'i18n_z_ui_media_player_unmute' : 'i18n_z_ui_media_player_mute') | translate\"\n (click)=\"toggleMute()\">\n <z-icon\n [zType]=\"isMuted() ? 'lucideVolumeX' : volume() < 0.5 ? 'lucideVolume1' : 'lucideVolume2'\"\n zSize=\"20\"\n [zStrokeWidth]=\"2\" />\n </button>\n <!-- Thanh tr\u01B0\u1EE3t \u00E2m l\u01B0\u1EE3ng tr\u01B0\u1EE3t ngang m\u1EDF r\u1ED9ng khi hover -->\n <input\n type=\"range\"\n id=\"z_media_player_volume_slider\"\n min=\"0\"\n max=\"1\"\n step=\"0.05\"\n [ngModel]=\"volume()\"\n (ngModelChange)=\"onVolumeChange($event)\"\n class=\"accent-red-650 h-1 w-0 cursor-pointer rounded-lg bg-white/20 opacity-0 transition-all duration-200 outline-none group-hover/volume:w-16 group-hover/volume:opacity-100 focus-visible:w-16 focus-visible:opacity-100\" />\n </div>\n\n <!-- Hi\u1EC3n th\u1ECB th\u1EDDi gian ph\u00E1t (currentTime / duration) -->\n <div class=\"pl-1 font-mono text-xs text-white/90 select-none\">\n <span>{{ currentTimeLabel() }}</span>\n <span class=\"mx-1 text-white/40\">/</span>\n <span class=\"text-white/60\">{{ durationLabel() }}</span>\n </div>\n </div>\n\n <!-- C\u00E1c n\u00FAt \u0111i\u1EC1u khi\u1EC3n ph\u00EDa b\u00EAn ph\u1EA3i -->\n <div class=\"flex items-center gap-1.5\">\n <!-- N\u00FAt m\u1EDF tr\u00ECnh \u0111\u01A1n C\u00E0i \u0111\u1EB7t b\u1EB1ng ZPopoverDirective -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_settings_btn\"\n class=\"flex size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none\"\n [title]=\"'i18n_z_ui_media_player_settings' | translate\"\n z-popover\n [zPopoverContent]=\"speedMenuTemplate\"\n zPosition=\"top-right\"\n zTrigger=\"click\"\n [zOffset]=\"6\"\n zClass=\"z-media-player-popover\"\n (zShow)=\"showSettings.set(true); onMouseMove()\"\n (zHide)=\"onSettingsHidden()\">\n <z-icon zType=\"lucideSettings\" zSize=\"20\" [zStrokeWidth]=\"2\" />\n </button>\n\n <!-- N\u00FAt Miniplayer (Picture-in-Picture) - \u1EA8n ho\u1EB7c disable n\u1EBFu browser ko h\u1ED7 tr\u1EE3 -->\n @if (isPiPSupported()) {\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_mini_btn\"\n class=\"hidden size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none sm:flex\"\n [title]=\"'i18n_z_ui_media_player_miniplayer' | translate\"\n (click)=\"toggleMiniplayer()\">\n <z-icon zType=\"lucideTv\" zSize=\"20\" [zStrokeWidth]=\"2\" />\n </button>\n }\n\n <!-- N\u00FAt b\u1EADt/t\u1EAFt ch\u1EBF \u0111\u1ED9 r\u1EA1p chi\u1EBFu phim (Theater Mode) -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n id=\"z_media_player_theater_btn\"\n class=\"flex hidden size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none md:flex\"\n [title]=\"\n (isTheaterMode() ? 'i18n_z_ui_media_player_default_mode' : 'i18n_z_ui_media_player_theater_mode') | translate\n \"\n (click)=\"toggleTheaterMode()\">\n <z-icon\n [zType]=\"isTheaterMode() ? 'lucideSquare' : 'lucideRectangleHorizontal'\"\n zSize=\"20\"\n [zStrokeWidth]=\"2\" />\n </button>\n\n <!-- N\u00FAt b\u1EADt/t\u1EAFt ch\u1EBF \u0111\u1ED9 to\u00E0n m\u00E0n h\u00ECnh (Fullscreen) -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_full_btn\"\n class=\"flex size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none\"\n [title]=\"\n (isFullscreen() ? 'i18n_z_ui_media_player_exit_fullscreen' : 'i18n_z_ui_media_player_fullscreen') | translate\n \"\n (click)=\"toggleFullscreen()\">\n <z-icon [zType]=\"isFullscreen() ? 'lucideMinimize' : 'lucideMaximize'\" zSize=\"20\" [zStrokeWidth]=\"2\" />\n </button>\n </div>\n </div>\n</div>\n\n<!-- Template c\u1EA5u h\u00ECnh Popover c\u00E0i \u0111\u1EB7t s\u1EED d\u1EE5ng ng-template -->\n<ng-template #speedMenuTemplate>\n <div\n class=\"z-media-player-settings flex w-44 flex-col px-1 py-[4px] text-zinc-200\"\n [class.z-main-panel]=\"settingsPanel() === 'main'\"\n [class.z-sub-panel]=\"settingsPanel() !== 'main'\">\n @if (settingsPanel() === 'main') {\n <div class=\"z-media-player-settings-panel flex flex-col\">\n @if (qualitySources().length > 1) {\n <button type=\"button\" class=\"z-media-player-settings-item\" (click)=\"openSettingsPanel('quality')\">\n <span class=\"min-w-0 flex-1 truncate whitespace-nowrap\">\n {{ 'i18n_z_ui_media_player_quality' | translate }}\n </span>\n <span class=\"flex max-w-[5.5rem] min-w-0 items-center gap-1.5 text-zinc-400\">\n <span class=\"min-w-0 truncate whitespace-nowrap\">{{ activeQualityLabel() }}</span>\n <z-icon zType=\"lucideChevronRight\" zSize=\"13\" class=\"shrink-0\" />\n </span>\n </button>\n }\n <button type=\"button\" class=\"z-media-player-settings-item\" (click)=\"openSettingsPanel('speed')\">\n <span class=\"min-w-0 flex-1 truncate whitespace-nowrap\">\n {{ 'i18n_z_ui_media_player_speed' | translate }}\n </span>\n <span class=\"flex max-w-[5.5rem] min-w-0 items-center gap-1.5 text-zinc-400\">\n <span class=\"min-w-0 truncate whitespace-nowrap\">\n {{ playbackSpeed() === 1 ? ('i18n_z_ui_media_player_normal' | translate) : playbackSpeed() + 'x' }}\n </span>\n <z-icon zType=\"lucideChevronRight\" zSize=\"13\" class=\"shrink-0\" />\n </span>\n </button>\n </div>\n }\n\n @if (settingsPanel() === 'quality') {\n <div class=\"z-media-player-settings-panel flex flex-col\">\n <button\n type=\"button\"\n [title]=\"'i18n_z_ui_media_player_back' | translate\"\n class=\"z-media-player-settings-back\"\n (click)=\"closeSettingsPanel()\">\n <z-icon zType=\"lucideChevronLeft\" zSize=\"13\" class=\"shrink-0\" />\n <span class=\"min-w-0 truncate whitespace-nowrap\">{{ 'i18n_z_ui_media_player_quality' | translate }}</span>\n </button>\n @for (source of qualitySources(); track source.src) {\n <button\n type=\"button\"\n [id]=\"'z_media_player_quality_btn_' + source.label\"\n class=\"z-media-player-settings-item\"\n [class.z-active]=\"effectiveSrc() === source.src\"\n (click)=\"setQualitySource(source)\">\n <span class=\"min-w-0 truncate whitespace-nowrap\">{{ source.label }}</span>\n </button>\n }\n </div>\n }\n\n @if (settingsPanel() === 'speed') {\n <div class=\"z-media-player-settings-panel flex flex-col\">\n <button\n type=\"button\"\n [title]=\"'i18n_z_ui_media_player_back' | translate\"\n class=\"z-media-player-settings-back\"\n (click)=\"closeSettingsPanel()\">\n <z-icon zType=\"lucideChevronLeft\" zSize=\"13\" class=\"shrink-0\" />\n <span class=\"min-w-0 truncate whitespace-nowrap\">{{ 'i18n_z_ui_media_player_speed' | translate }}</span>\n </button>\n @for (speed of playbackSpeeds; track speed.value) {\n <button\n type=\"button\"\n [id]=\"'z_media_player_speed_btn_' + speed.value\"\n class=\"z-media-player-settings-item\"\n [class.z-active]=\"playbackSpeed() === speed.value\"\n (click)=\"setPlaybackSpeed(speed.value)\">\n <span class=\"min-w-0 truncate whitespace-nowrap\">{{ speed.label | translate }}</span>\n </button>\n }\n </div>\n }\n </div>\n</ng-template>\n", styles: ["z-media-player{display:block;width:100%;outline:none}z-media-player:focus,z-media-player:focus-visible{outline:none}z-media-player video::cue{background-color:#080808d9;color:#fff;font-family:inherit;font-size:16px;text-shadow:0 1px 2px rgba(0,0,0,.9);padding:4px 8px;border-radius:4px}z-media-player .z-flash-animation{animation:zUiFlashIcon .72s cubic-bezier(.2,.85,.25,1) forwards;will-change:opacity,transform,filter}z-media-player .z-flash-animation z-icon{width:24px!important;height:24px!important}@media(min-width:640px){z-media-player .z-flash-animation z-icon{width:32px!important;height:32px!important}}@keyframes zUiFlashIcon{0%{filter:blur(2px);opacity:0;transform:scale(.72)}18%{filter:blur(0);opacity:.95;transform:scale(1)}58%{opacity:.9;transform:scale(1.04)}to{filter:blur(0);opacity:0;transform:scale(1.18)}}z-media-player .animate-fade-in{animation:zUiFadeIn .2s cubic-bezier(.16,1,.3,1)}@keyframes zUiFadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}z-media-player .z-double-tap-ripple-left,z-media-player .z-double-tap-ripple-right{position:absolute;top:0;bottom:0;width:35%;display:flex;align-items:center;z-index:11;pointer-events:none}z-media-player .z-double-tap-ripple-left:before,z-media-player .z-double-tap-ripple-right:before{position:absolute;inset:0;content:\"\";opacity:0;animation-duration:.72s;animation-fill-mode:forwards;animation-timing-function:cubic-bezier(.25,1,.5,1)}z-media-player .z-double-tap-ripple-left{left:0;justify-content:flex-start;padding-left:5%}z-media-player .z-double-tap-ripple-left:before{background:radial-gradient(circle at 0% 50%,#ffffff21,#fff0 70%);border-top-right-radius:100% 50%;border-bottom-right-radius:100% 50%;animation-name:zUiDoubleTapRippleLeft;transform-origin:left center}z-media-player .z-double-tap-ripple-left.z-skip-pulse-alt:before{animation-name:zUiDoubleTapRippleLeftAlt}z-media-player .z-double-tap-ripple-right{right:0;justify-content:flex-end;padding-right:5%}z-media-player .z-double-tap-ripple-right:before{background:radial-gradient(circle at 100% 50%,#ffffff21,#fff0 70%);border-top-left-radius:100% 50%;border-bottom-left-radius:100% 50%;animation-name:zUiDoubleTapRippleRight;transform-origin:right center}z-media-player .z-double-tap-ripple-right.z-skip-pulse-alt:before{animation-name:zUiDoubleTapRippleRightAlt}z-media-player .z-skip-overlay-content{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;min-width:92px;color:#fff;font-family:inherit;font-size:18px;font-weight:700;line-height:1;text-shadow:0 2px 8px rgba(0,0,0,.75);-webkit-user-select:none;user-select:none}z-media-player .z-skip-overlay-number{min-width:42px;animation:zUiSkipNumberBump .22s cubic-bezier(.2,.85,.25,1) forwards;text-align:center;transform-origin:center}z-media-player .z-skip-pulse-alt .z-skip-overlay-number{animation-name:zUiSkipNumberBumpAlt}z-media-player .z-skip-overlay-arrows{display:inline-flex;align-items:center;color:#fffffff2;filter:drop-shadow(0 2px 6px rgba(0,0,0,.7))}@keyframes zUiDoubleTapRippleLeft{0%{opacity:0;transform:scaleX(.5);transform-origin:left center}15%{opacity:1}80%{opacity:1}to{opacity:0;transform:scaleX(1);transform-origin:left center}}@keyframes zUiDoubleTapRippleLeftAlt{0%{opacity:0;transform:scaleX(.5);transform-origin:left center}15%{opacity:1}80%{opacity:1}to{opacity:0;transform:scaleX(1);transform-origin:left center}}@keyframes zUiDoubleTapRippleRight{0%{opacity:0;transform:scaleX(.5);transform-origin:right center}15%{opacity:1}80%{opacity:1}to{opacity:0;transform:scaleX(1);transform-origin:right center}}@keyframes zUiDoubleTapRippleRightAlt{0%{opacity:0;transform:scaleX(.5);transform-origin:right center}15%{opacity:1}80%{opacity:1}to{opacity:0;transform:scaleX(1);transform-origin:right center}}z-media-player .z-chevron-slide-left{animation:zUiChevronSlideLeft .72s cubic-bezier(.25,1,.5,1) forwards}z-media-player .z-chevron-slide-right{animation:zUiChevronSlideRight .72s cubic-bezier(.25,1,.5,1) forwards}z-media-player .z-skip-pulse-alt .z-chevron-slide-left{animation-name:zUiChevronSlideLeftAlt}z-media-player .z-skip-pulse-alt .z-chevron-slide-right{animation-name:zUiChevronSlideRightAlt}@keyframes zUiSkipNumberBump{0%{opacity:.78;transform:scale(.92)}55%{opacity:1;transform:scale(1.12)}to{opacity:1;transform:scale(1)}}@keyframes zUiSkipNumberBumpAlt{0%{opacity:.78;transform:scale(.92)}55%{opacity:1;transform:scale(1.12)}to{opacity:1;transform:scale(1)}}@keyframes zUiChevronSlideLeft{0%{opacity:0;transform:translate(8px)}28%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(-12px)}}@keyframes zUiChevronSlideRight{0%{opacity:0;transform:translate(-8px)}28%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(12px)}}@keyframes zUiChevronSlideLeftAlt{0%{opacity:0;transform:translate(8px)}28%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(-12px)}}@keyframes zUiChevronSlideRightAlt{0%{opacity:0;transform:translate(-8px)}28%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(12px)}}z-media-player #z_media_player_volume_slider{-webkit-appearance:none;appearance:none;background:transparent}z-media-player #z_media_player_volume_slider::-webkit-slider-runnable-track{background:#ffffff40;height:3px;border-radius:9999px}z-media-player #z_media_player_volume_slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background:#fff;height:10px;width:10px;border-radius:9999px;margin-top:-3.5px;transition:transform .15s ease}z-media-player #z_media_player_volume_slider:hover::-webkit-slider-thumb,z-media-player #z_media_player_volume_slider:focus-visible::-webkit-slider-thumb{transform:scale(1.3)}z-media-player #z_media_player_volume_slider::-moz-range-track{background:#ffffff40;height:3px;border-radius:9999px}z-media-player #z_media_player_volume_slider::-moz-range-thumb{background:#fff;height:10px;width:10px;border-radius:9999px;border:none;transition:transform .15s ease}z-media-player #z_media_player_volume_slider:hover::-moz-range-thumb,z-media-player #z_media_player_volume_slider:focus-visible::-moz-range-thumb{transform:scale(1.3)}.z-media-player-popover{backdrop-filter:blur(24px)!important;-webkit-backdrop-filter:blur(24px)!important;background-color:#0f0f0f99!important;border:1px solid rgba(255,255,255,.08)!important;box-shadow:0 15px 30px -10px #000c!important;border-radius:8px!important;padding:0!important;transform-origin:bottom right}.z-media-player-popover[data-state=open]{animation:zUiMediaSettingsPopoverIn .16s cubic-bezier(.2,.85,.25,1) forwards}.z-media-player-popover[data-state=closed]{animation:zUiMediaSettingsPopoverOut .16s cubic-bezier(.4,0,.2,1) forwards!important}.z-media-player-popover .bg-popover{background-color:transparent!important;color:#e4e4e7!important}.z-media-player-popover .z-media-player-settings{overflow:hidden;transform-origin:bottom right;animation:zUiMediaSettingsPanelIn .16s cubic-bezier(.2,.85,.25,1)}.z-media-player-popover .z-media-player-settings-panel{gap:4px;transform-origin:top right;animation:zUiMediaSettingsPanelIn .14s cubic-bezier(.2,.85,.25,1);will-change:opacity,transform}.z-media-player-popover .z-media-player-settings.z-main-panel .z-media-player-settings-panel{animation-name:zUiMediaSettingsPanelFromLeft}.z-media-player-popover .z-media-player-settings.z-sub-panel .z-media-player-settings-panel{animation-name:zUiMediaSettingsPanelFromRight}.z-media-player-popover .z-media-player-settings-item,.z-media-player-popover .z-media-player-settings-back{position:relative;display:flex;width:100%;min-width:0;height:32px;min-height:32px;cursor:pointer;align-items:center;border:0;border-radius:4px;background-color:transparent;padding:0 8px;color:#e4e4e7;font-size:12px;font-weight:500;line-height:1;outline:none;transition:background-color .12s ease,color .12s ease}.z-media-player-popover .z-media-player-settings-item{justify-content:space-between;gap:12px;text-align:left}.z-media-player-popover .z-media-player-settings-item:before{position:absolute;top:7px;bottom:7px;left:0;width:2px;border-radius:9999px;background-color:#fff;content:\"\";opacity:0;transform:scaleY(.5);transition:opacity .12s ease,transform .12s ease}.z-media-player-popover .z-media-player-settings-item.z-active{background-color:#ffffff14;color:#fff;font-weight:600}.z-media-player-popover .z-media-player-settings-item.z-active:before{opacity:1;transform:scaleY(1)}.z-media-player-popover .z-media-player-settings-back{justify-content:flex-start;gap:8px;color:#f4f4f5;font-weight:600}.z-media-player-popover .z-media-player-settings-item:hover,.z-media-player-popover .z-media-player-settings-back:hover,.z-media-player-popover .z-media-player-settings-item:focus-visible,.z-media-player-popover .z-media-player-settings-back:focus-visible{background-color:#ffffff1a}@keyframes zUiMediaSettingsPopoverIn{0%{opacity:0;transform:translateY(6px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes zUiMediaSettingsPopoverOut{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(4px) scale(.96)}}@keyframes zUiMediaSettingsPanelIn{0%{opacity:0;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}@keyframes zUiMediaSettingsPanelFromRight{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}@keyframes zUiMediaSettingsPanelFromLeft{0%{opacity:0;transform:translate(-5px)}to{opacity:1;transform:translate(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: ZPopoverDirective, selector: "[z-popover]", inputs: ["zPopoverContent", "zPosition", "zTrigger", "zPopoverTrigger", "zClass", "zShowDelay", "zHideDelay", "zDisabled", "zOffset", "zPopoverWidth", "zTriggerRef", "zManualClose", "zOutsideClickClose", "zScrollClose", "zShowArrow"], outputs: ["zShow", "zHide", "zHideStart", "zControl", "zPositionChange", "zOutsideClick"], exportAs: ["zPopover"] }, { kind: "component", type: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zAnimatedTypeIcon", "zAnimateIcon", "zAnimationTriggerIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
640
+ }
641
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZMediaPlayerComponent, decorators: [{
642
+ type: Component,
643
+ args: [{ selector: 'z-media-player', imports: [CommonModule, FormsModule, ZIconComponent, ZPopoverDirective, TranslatePipe, ZButtonComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
644
+ '[class]': 'zClasses()',
645
+ '[attr.tabindex]': '0',
646
+ '(keydown)': 'onKeyDown($event)',
647
+ '(mousemove)': 'onMouseMove()',
648
+ '(mouseleave)': 'onMouseLeave()',
649
+ '(document:fullscreenchange)': 'onFullscreenStateChange()',
650
+ }, template: "<!-- Th\u1EBB video ch\u00EDnh ph\u00E1t ngu\u1ED3n zSrc -->\n<video\n #videoElement\n class=\"h-full w-full cursor-pointer object-contain\"\n [src]=\"effectiveSrc()\"\n [poster]=\"zPoster()\"\n [loop]=\"zLoop()\"\n [autoplay]=\"zAutoplay()\"\n playsinline\n webkit-playsinline\n (click)=\"onVideoClick($event)\"\n (play)=\"onPlayStateChange(true)\"\n (pause)=\"onPlayStateChange(false)\"\n (timeupdate)=\"onTimeUpdate()\"\n (durationchange)=\"onDurationChange()\"\n (seeking)=\"onSeeking(true)\"\n (seeked)=\"onSeeking(false)\"\n (waiting)=\"onSeeking(true)\"\n (playing)=\"onSeeking(false)\"\n (enterpictureinpicture)=\"onEnterPiP()\"\n (leavepictureinpicture)=\"onLeavePiP()\"\n (webkitpresentationmodechanged)=\"onWebkitPresentationModeChanged()\">\n @for (sub of zSubtitles(); track sub.src) {\n <track\n [src]=\"sub.src\"\n kind=\"subtitles\"\n [srclang]=\"sub.srclang\"\n [label]=\"sub.label\"\n [default]=\"sub.default || false\" />\n }\n</video>\n\n<!-- L\u1EDBp ph\u1EE7 v\u00F2ng xoay loading khi video \u0111ang buffer -->\n@if (isBuffering()) {\n <div class=\"pointer-events-none absolute inset-0 z-[10] flex items-center justify-center bg-black/20\">\n <div class=\"size-14 animate-spin rounded-full border-4 border-white/20 border-t-red-600\"></div>\n </div>\n}\n\n<!-- Hi\u1EC7u \u1EE9ng nh\u1EA5p nh\u00E1y Play/Pause l\u1EDBn gi\u1EEFa m\u00E0n h\u00ECnh t\u01B0\u01A1ng t\u1EF1 YouTube -->\n@if (playPauseFlash()) {\n <div class=\"pointer-events-none absolute inset-0 z-[11] flex items-center justify-center\">\n <div\n class=\"z-flash-animation flex size-14 items-center justify-center rounded-full bg-black/60 text-white sm:size-20\">\n <z-icon [zType]=\"playPauseFlash() === 'play' ? 'lucidePlay' : 'lucidePause'\" zSize=\"24\" [zStrokeWidth]=\"2\" />\n </div>\n </div>\n}\n\n<!-- L\u1EDBp ph\u1EE7 tua nhanh nh\u1EA3y s\u1ED1 c\u1ED9ng d\u1ED3n Tr\u00E1i (YouTube style) -->\n@if (skipOverlayValue() > 0 && skipOverlayDirection() === 'left') {\n <div class=\"z-double-tap-ripple-left\" [class.z-skip-pulse-alt]=\"skipOverlayPulse() % 2 === 1\">\n <div class=\"z-skip-overlay-content\">\n <span class=\"z-skip-overlay-number\">- {{ skipOverlayValue() }}</span>\n <span class=\"z-skip-overlay-arrows z-chevron-slide-left\">\n <z-icon zType=\"lucideChevronsLeft\" zSize=\"26\" [zStrokeWidth]=\"2.4\" />\n </span>\n </div>\n </div>\n}\n\n<!-- L\u1EDBp ph\u1EE7 tua nhanh nh\u1EA3y s\u1ED1 c\u1ED9ng d\u1ED3n Ph\u1EA3i (YouTube style) -->\n@if (skipOverlayValue() > 0 && skipOverlayDirection() === 'right') {\n <div class=\"z-double-tap-ripple-right\" [class.z-skip-pulse-alt]=\"skipOverlayPulse() % 2 === 1\">\n <div class=\"z-skip-overlay-content\">\n <span class=\"z-skip-overlay-arrows z-chevron-slide-right\">\n <z-icon zType=\"lucideChevronsRight\" zSize=\"26\" [zStrokeWidth]=\"2.4\" />\n </span>\n <span class=\"z-skip-overlay-number\">+ {{ skipOverlayValue() }}</span>\n </div>\n </div>\n}\n\n<!-- L\u1EDBp ph\u1EE7 ch\u1EE9a thanh \u0111i\u1EC1u khi\u1EC3n (Bottom controls panel) -->\n<div\n class=\"pointer-events-none absolute inset-x-0 bottom-0 z-[12] flex flex-col bg-gradient-to-t from-black/85 via-black/40 to-transparent p-3 pt-12 transition-opacity duration-300 select-none\"\n [class.opacity-0]=\"!showControls()\"\n [class.invisible]=\"!showControls()\">\n <!-- Thanh Timeline (Progress Bar) t\u00F9y ch\u1EC9nh ki\u1EC3u YouTube -->\n <div\n #timelineContainer\n id=\"z_media_player_timeline\"\n class=\"group/timeline pointer-events-auto relative mb-3 flex h-1 w-full cursor-pointer items-center transition-all hover:h-1.5\"\n (mousedown)=\"onTimelineDragStart($event)\"\n (mousemove)=\"onTimelineHover($event)\"\n (mouseleave)=\"onTimelineHoverEnd()\">\n <!-- Thanh n\u1EC1n x\u00E1m c\u1EE7a thanh timeline -->\n <div\n class=\"absolute inset-x-0 h-1 overflow-hidden rounded-full bg-white/25 transition-all group-hover/timeline:h-1.5\">\n <!-- Ti\u1EBFn tr\u00ECnh t\u1EA3i buffer c\u1EE7a video -->\n <div class=\"absolute top-0 left-0 h-full rounded-full bg-white/30\" [style.width.%]=\"bufferedProgress()\"></div>\n <!-- Ti\u1EBFn tr\u00ECnh ph\u00E1t hi\u1EC7n t\u1EA1i c\u1EE7a video -->\n <div class=\"absolute top-0 left-0 h-full rounded-full bg-red-600\" [style.width.%]=\"progress()\"></div>\n </div>\n\n <!-- \u0110\u1EA7u k\u00E9o timeline (Thumb) \u0111\u1ECF ch\u1EC9 hi\u1EC3n th\u1ECB khi hover ho\u1EB7c k\u00E9o -->\n <div\n class=\"bg-red-650 pointer-events-none absolute size-3.5 -translate-x-1/2 scale-0 transform rounded-full opacity-0 transition-opacity duration-150 group-hover/timeline:scale-100 group-hover/timeline:opacity-100\"\n [style.left.%]=\"progress()\"></div>\n\n <!-- Tooltip hi\u1EC3n th\u1ECB m\u1ED1c th\u1EDDi gian khi hover -->\n @if (hoverTimeLabel()) {\n <div\n class=\"pointer-events-none absolute bottom-4 z-[20] -translate-x-1/2 rounded-xs bg-zinc-950/70 px-2 py-1 font-mono text-[11px] leading-none whitespace-nowrap text-zinc-100 shadow-[0_12px_24px_-10px_rgba(0,0,0,0.85)] backdrop-blur-2xl\"\n [style.left.px]=\"hoverX()\">\n {{ hoverTimeLabel() }}\n </div>\n }\n </div>\n\n <!-- H\u00E0ng ch\u1EE9a c\u00E1c n\u00FAt b\u1EA5m \u0111i\u1EC1u khi\u1EC3n ch\u1EE9c n\u0103ng -->\n <div class=\"pointer-events-auto flex items-center justify-between text-sm text-white\">\n <!-- C\u00E1c n\u00FAt \u0111i\u1EC1u khi\u1EC3n ph\u00EDa b\u00EAn tr\u00E1i -->\n <div class=\"flex items-center gap-2\">\n <!-- N\u00FAt Ph\u00E1t / T\u1EA1m d\u1EEBng -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_play_btn\"\n class=\"mr-1 flex size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none\"\n [title]=\"(isPlaying() ? 'i18n_z_ui_media_player_pause' : 'i18n_z_ui_media_player_play') | translate\"\n (click)=\"togglePlay()\">\n <z-icon [zType]=\"isPlaying() ? 'lucidePause' : 'lucidePlay'\" zSize=\"20\" [zStrokeWidth]=\"2\" />\n </button>\n\n <!-- N\u00FAt Tua l\u00F9i 5s -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_rewind_5_btn\"\n class=\"hidden size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none sm:flex\"\n title=\"Tua l\u00F9i 5 gi\u00E2y (Arrow Left)\"\n (click)=\"triggerSkip(5, 'left')\">\n <div class=\"relative flex items-center justify-center\">\n <z-icon zType=\"lucideRotateCcw\" zSize=\"18\" [zStrokeWidth]=\"2\" />\n <span class=\"pointer-events-none absolute mt-[1px] scale-75 text-[8px] font-bold text-white select-none\">\n 5\n </span>\n </div>\n </button>\n\n <!-- N\u00FAt Tua ti\u1EBFn 5s -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_forward_5_btn\"\n class=\"mr-1 hidden size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none sm:flex\"\n title=\"Tua ti\u1EBFn 5 gi\u00E2y (Arrow Right)\"\n (click)=\"triggerSkip(5, 'right')\">\n <div class=\"relative flex items-center justify-center\">\n <z-icon zType=\"lucideRotateCw\" zSize=\"18\" [zStrokeWidth]=\"2\" />\n <span class=\"pointer-events-none absolute mt-[1px] scale-75 text-[8px] font-bold text-white select-none\">\n 5\n </span>\n </div>\n </button>\n\n <!-- T\u1ED5 h\u1EE3p n\u00FAt Mute v\u00E0 Slider \u00E2m l\u01B0\u1EE3ng tr\u01B0\u1EE3t ngang -->\n <div class=\"group/volume hidden items-center gap-1.5 sm:flex\">\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_mute_btn\"\n class=\"flex size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none\"\n [title]=\"(isMuted() ? 'i18n_z_ui_media_player_unmute' : 'i18n_z_ui_media_player_mute') | translate\"\n (click)=\"toggleMute()\">\n <z-icon\n [zType]=\"isMuted() ? 'lucideVolumeX' : volume() < 0.5 ? 'lucideVolume1' : 'lucideVolume2'\"\n zSize=\"20\"\n [zStrokeWidth]=\"2\" />\n </button>\n <!-- Thanh tr\u01B0\u1EE3t \u00E2m l\u01B0\u1EE3ng tr\u01B0\u1EE3t ngang m\u1EDF r\u1ED9ng khi hover -->\n <input\n type=\"range\"\n id=\"z_media_player_volume_slider\"\n min=\"0\"\n max=\"1\"\n step=\"0.05\"\n [ngModel]=\"volume()\"\n (ngModelChange)=\"onVolumeChange($event)\"\n class=\"accent-red-650 h-1 w-0 cursor-pointer rounded-lg bg-white/20 opacity-0 transition-all duration-200 outline-none group-hover/volume:w-16 group-hover/volume:opacity-100 focus-visible:w-16 focus-visible:opacity-100\" />\n </div>\n\n <!-- Hi\u1EC3n th\u1ECB th\u1EDDi gian ph\u00E1t (currentTime / duration) -->\n <div class=\"pl-1 font-mono text-xs text-white/90 select-none\">\n <span>{{ currentTimeLabel() }}</span>\n <span class=\"mx-1 text-white/40\">/</span>\n <span class=\"text-white/60\">{{ durationLabel() }}</span>\n </div>\n </div>\n\n <!-- C\u00E1c n\u00FAt \u0111i\u1EC1u khi\u1EC3n ph\u00EDa b\u00EAn ph\u1EA3i -->\n <div class=\"flex items-center gap-1.5\">\n <!-- N\u00FAt m\u1EDF tr\u00ECnh \u0111\u01A1n C\u00E0i \u0111\u1EB7t b\u1EB1ng ZPopoverDirective -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_settings_btn\"\n class=\"flex size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none\"\n [title]=\"'i18n_z_ui_media_player_settings' | translate\"\n z-popover\n [zPopoverContent]=\"speedMenuTemplate\"\n zPosition=\"top-right\"\n zTrigger=\"click\"\n [zOffset]=\"6\"\n zClass=\"z-media-player-popover\"\n (zShow)=\"showSettings.set(true); onMouseMove()\"\n (zHide)=\"onSettingsHidden()\">\n <z-icon zType=\"lucideSettings\" zSize=\"20\" [zStrokeWidth]=\"2\" />\n </button>\n\n <!-- N\u00FAt Miniplayer (Picture-in-Picture) - \u1EA8n ho\u1EB7c disable n\u1EBFu browser ko h\u1ED7 tr\u1EE3 -->\n @if (isPiPSupported()) {\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_mini_btn\"\n class=\"hidden size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none sm:flex\"\n [title]=\"'i18n_z_ui_media_player_miniplayer' | translate\"\n (click)=\"toggleMiniplayer()\">\n <z-icon zType=\"lucideTv\" zSize=\"20\" [zStrokeWidth]=\"2\" />\n </button>\n }\n\n <!-- N\u00FAt b\u1EADt/t\u1EAFt ch\u1EBF \u0111\u1ED9 r\u1EA1p chi\u1EBFu phim (Theater Mode) -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n id=\"z_media_player_theater_btn\"\n class=\"flex hidden size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none md:flex\"\n [title]=\"\n (isTheaterMode() ? 'i18n_z_ui_media_player_default_mode' : 'i18n_z_ui_media_player_theater_mode') | translate\n \"\n (click)=\"toggleTheaterMode()\">\n <z-icon\n [zType]=\"isTheaterMode() ? 'lucideSquare' : 'lucideRectangleHorizontal'\"\n zSize=\"20\"\n [zStrokeWidth]=\"2\" />\n </button>\n\n <!-- N\u00FAt b\u1EADt/t\u1EAFt ch\u1EBF \u0111\u1ED9 to\u00E0n m\u00E0n h\u00ECnh (Fullscreen) -->\n <button\n z-button\n zType=\"ghost\"\n zSize=\"sm\"\n zShape=\"default\"\n [zWave]=\"false\"\n type=\"button\"\n id=\"z_media_player_full_btn\"\n class=\"flex size-8 cursor-pointer items-center justify-center rounded-xs border-0 border-none bg-transparent p-0 text-white shadow-none transition-colors outline-none hover:bg-white/15 hover:text-white focus:outline-none focus-visible:outline-none\"\n [title]=\"\n (isFullscreen() ? 'i18n_z_ui_media_player_exit_fullscreen' : 'i18n_z_ui_media_player_fullscreen') | translate\n \"\n (click)=\"toggleFullscreen()\">\n <z-icon [zType]=\"isFullscreen() ? 'lucideMinimize' : 'lucideMaximize'\" zSize=\"20\" [zStrokeWidth]=\"2\" />\n </button>\n </div>\n </div>\n</div>\n\n<!-- Template c\u1EA5u h\u00ECnh Popover c\u00E0i \u0111\u1EB7t s\u1EED d\u1EE5ng ng-template -->\n<ng-template #speedMenuTemplate>\n <div\n class=\"z-media-player-settings flex w-44 flex-col px-1 py-[4px] text-zinc-200\"\n [class.z-main-panel]=\"settingsPanel() === 'main'\"\n [class.z-sub-panel]=\"settingsPanel() !== 'main'\">\n @if (settingsPanel() === 'main') {\n <div class=\"z-media-player-settings-panel flex flex-col\">\n @if (qualitySources().length > 1) {\n <button type=\"button\" class=\"z-media-player-settings-item\" (click)=\"openSettingsPanel('quality')\">\n <span class=\"min-w-0 flex-1 truncate whitespace-nowrap\">\n {{ 'i18n_z_ui_media_player_quality' | translate }}\n </span>\n <span class=\"flex max-w-[5.5rem] min-w-0 items-center gap-1.5 text-zinc-400\">\n <span class=\"min-w-0 truncate whitespace-nowrap\">{{ activeQualityLabel() }}</span>\n <z-icon zType=\"lucideChevronRight\" zSize=\"13\" class=\"shrink-0\" />\n </span>\n </button>\n }\n <button type=\"button\" class=\"z-media-player-settings-item\" (click)=\"openSettingsPanel('speed')\">\n <span class=\"min-w-0 flex-1 truncate whitespace-nowrap\">\n {{ 'i18n_z_ui_media_player_speed' | translate }}\n </span>\n <span class=\"flex max-w-[5.5rem] min-w-0 items-center gap-1.5 text-zinc-400\">\n <span class=\"min-w-0 truncate whitespace-nowrap\">\n {{ playbackSpeed() === 1 ? ('i18n_z_ui_media_player_normal' | translate) : playbackSpeed() + 'x' }}\n </span>\n <z-icon zType=\"lucideChevronRight\" zSize=\"13\" class=\"shrink-0\" />\n </span>\n </button>\n </div>\n }\n\n @if (settingsPanel() === 'quality') {\n <div class=\"z-media-player-settings-panel flex flex-col\">\n <button\n type=\"button\"\n [title]=\"'i18n_z_ui_media_player_back' | translate\"\n class=\"z-media-player-settings-back\"\n (click)=\"closeSettingsPanel()\">\n <z-icon zType=\"lucideChevronLeft\" zSize=\"13\" class=\"shrink-0\" />\n <span class=\"min-w-0 truncate whitespace-nowrap\">{{ 'i18n_z_ui_media_player_quality' | translate }}</span>\n </button>\n @for (source of qualitySources(); track source.src) {\n <button\n type=\"button\"\n [id]=\"'z_media_player_quality_btn_' + source.label\"\n class=\"z-media-player-settings-item\"\n [class.z-active]=\"effectiveSrc() === source.src\"\n (click)=\"setQualitySource(source)\">\n <span class=\"min-w-0 truncate whitespace-nowrap\">{{ source.label }}</span>\n </button>\n }\n </div>\n }\n\n @if (settingsPanel() === 'speed') {\n <div class=\"z-media-player-settings-panel flex flex-col\">\n <button\n type=\"button\"\n [title]=\"'i18n_z_ui_media_player_back' | translate\"\n class=\"z-media-player-settings-back\"\n (click)=\"closeSettingsPanel()\">\n <z-icon zType=\"lucideChevronLeft\" zSize=\"13\" class=\"shrink-0\" />\n <span class=\"min-w-0 truncate whitespace-nowrap\">{{ 'i18n_z_ui_media_player_speed' | translate }}</span>\n </button>\n @for (speed of playbackSpeeds; track speed.value) {\n <button\n type=\"button\"\n [id]=\"'z_media_player_speed_btn_' + speed.value\"\n class=\"z-media-player-settings-item\"\n [class.z-active]=\"playbackSpeed() === speed.value\"\n (click)=\"setPlaybackSpeed(speed.value)\">\n <span class=\"min-w-0 truncate whitespace-nowrap\">{{ speed.label | translate }}</span>\n </button>\n }\n </div>\n }\n </div>\n</ng-template>\n", styles: ["z-media-player{display:block;width:100%;outline:none}z-media-player:focus,z-media-player:focus-visible{outline:none}z-media-player video::cue{background-color:#080808d9;color:#fff;font-family:inherit;font-size:16px;text-shadow:0 1px 2px rgba(0,0,0,.9);padding:4px 8px;border-radius:4px}z-media-player .z-flash-animation{animation:zUiFlashIcon .72s cubic-bezier(.2,.85,.25,1) forwards;will-change:opacity,transform,filter}z-media-player .z-flash-animation z-icon{width:24px!important;height:24px!important}@media(min-width:640px){z-media-player .z-flash-animation z-icon{width:32px!important;height:32px!important}}@keyframes zUiFlashIcon{0%{filter:blur(2px);opacity:0;transform:scale(.72)}18%{filter:blur(0);opacity:.95;transform:scale(1)}58%{opacity:.9;transform:scale(1.04)}to{filter:blur(0);opacity:0;transform:scale(1.18)}}z-media-player .animate-fade-in{animation:zUiFadeIn .2s cubic-bezier(.16,1,.3,1)}@keyframes zUiFadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}z-media-player .z-double-tap-ripple-left,z-media-player .z-double-tap-ripple-right{position:absolute;top:0;bottom:0;width:35%;display:flex;align-items:center;z-index:11;pointer-events:none}z-media-player .z-double-tap-ripple-left:before,z-media-player .z-double-tap-ripple-right:before{position:absolute;inset:0;content:\"\";opacity:0;animation-duration:.72s;animation-fill-mode:forwards;animation-timing-function:cubic-bezier(.25,1,.5,1)}z-media-player .z-double-tap-ripple-left{left:0;justify-content:flex-start;padding-left:5%}z-media-player .z-double-tap-ripple-left:before{background:radial-gradient(circle at 0% 50%,#ffffff21,#fff0 70%);border-top-right-radius:100% 50%;border-bottom-right-radius:100% 50%;animation-name:zUiDoubleTapRippleLeft;transform-origin:left center}z-media-player .z-double-tap-ripple-left.z-skip-pulse-alt:before{animation-name:zUiDoubleTapRippleLeftAlt}z-media-player .z-double-tap-ripple-right{right:0;justify-content:flex-end;padding-right:5%}z-media-player .z-double-tap-ripple-right:before{background:radial-gradient(circle at 100% 50%,#ffffff21,#fff0 70%);border-top-left-radius:100% 50%;border-bottom-left-radius:100% 50%;animation-name:zUiDoubleTapRippleRight;transform-origin:right center}z-media-player .z-double-tap-ripple-right.z-skip-pulse-alt:before{animation-name:zUiDoubleTapRippleRightAlt}z-media-player .z-skip-overlay-content{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;min-width:92px;color:#fff;font-family:inherit;font-size:18px;font-weight:700;line-height:1;text-shadow:0 2px 8px rgba(0,0,0,.75);-webkit-user-select:none;user-select:none}z-media-player .z-skip-overlay-number{min-width:42px;animation:zUiSkipNumberBump .22s cubic-bezier(.2,.85,.25,1) forwards;text-align:center;transform-origin:center}z-media-player .z-skip-pulse-alt .z-skip-overlay-number{animation-name:zUiSkipNumberBumpAlt}z-media-player .z-skip-overlay-arrows{display:inline-flex;align-items:center;color:#fffffff2;filter:drop-shadow(0 2px 6px rgba(0,0,0,.7))}@keyframes zUiDoubleTapRippleLeft{0%{opacity:0;transform:scaleX(.5);transform-origin:left center}15%{opacity:1}80%{opacity:1}to{opacity:0;transform:scaleX(1);transform-origin:left center}}@keyframes zUiDoubleTapRippleLeftAlt{0%{opacity:0;transform:scaleX(.5);transform-origin:left center}15%{opacity:1}80%{opacity:1}to{opacity:0;transform:scaleX(1);transform-origin:left center}}@keyframes zUiDoubleTapRippleRight{0%{opacity:0;transform:scaleX(.5);transform-origin:right center}15%{opacity:1}80%{opacity:1}to{opacity:0;transform:scaleX(1);transform-origin:right center}}@keyframes zUiDoubleTapRippleRightAlt{0%{opacity:0;transform:scaleX(.5);transform-origin:right center}15%{opacity:1}80%{opacity:1}to{opacity:0;transform:scaleX(1);transform-origin:right center}}z-media-player .z-chevron-slide-left{animation:zUiChevronSlideLeft .72s cubic-bezier(.25,1,.5,1) forwards}z-media-player .z-chevron-slide-right{animation:zUiChevronSlideRight .72s cubic-bezier(.25,1,.5,1) forwards}z-media-player .z-skip-pulse-alt .z-chevron-slide-left{animation-name:zUiChevronSlideLeftAlt}z-media-player .z-skip-pulse-alt .z-chevron-slide-right{animation-name:zUiChevronSlideRightAlt}@keyframes zUiSkipNumberBump{0%{opacity:.78;transform:scale(.92)}55%{opacity:1;transform:scale(1.12)}to{opacity:1;transform:scale(1)}}@keyframes zUiSkipNumberBumpAlt{0%{opacity:.78;transform:scale(.92)}55%{opacity:1;transform:scale(1.12)}to{opacity:1;transform:scale(1)}}@keyframes zUiChevronSlideLeft{0%{opacity:0;transform:translate(8px)}28%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(-12px)}}@keyframes zUiChevronSlideRight{0%{opacity:0;transform:translate(-8px)}28%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(12px)}}@keyframes zUiChevronSlideLeftAlt{0%{opacity:0;transform:translate(8px)}28%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(-12px)}}@keyframes zUiChevronSlideRightAlt{0%{opacity:0;transform:translate(-8px)}28%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(12px)}}z-media-player #z_media_player_volume_slider{-webkit-appearance:none;appearance:none;background:transparent}z-media-player #z_media_player_volume_slider::-webkit-slider-runnable-track{background:#ffffff40;height:3px;border-radius:9999px}z-media-player #z_media_player_volume_slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background:#fff;height:10px;width:10px;border-radius:9999px;margin-top:-3.5px;transition:transform .15s ease}z-media-player #z_media_player_volume_slider:hover::-webkit-slider-thumb,z-media-player #z_media_player_volume_slider:focus-visible::-webkit-slider-thumb{transform:scale(1.3)}z-media-player #z_media_player_volume_slider::-moz-range-track{background:#ffffff40;height:3px;border-radius:9999px}z-media-player #z_media_player_volume_slider::-moz-range-thumb{background:#fff;height:10px;width:10px;border-radius:9999px;border:none;transition:transform .15s ease}z-media-player #z_media_player_volume_slider:hover::-moz-range-thumb,z-media-player #z_media_player_volume_slider:focus-visible::-moz-range-thumb{transform:scale(1.3)}.z-media-player-popover{backdrop-filter:blur(24px)!important;-webkit-backdrop-filter:blur(24px)!important;background-color:#0f0f0f99!important;border:1px solid rgba(255,255,255,.08)!important;box-shadow:0 15px 30px -10px #000c!important;border-radius:8px!important;padding:0!important;transform-origin:bottom right}.z-media-player-popover[data-state=open]{animation:zUiMediaSettingsPopoverIn .16s cubic-bezier(.2,.85,.25,1) forwards}.z-media-player-popover[data-state=closed]{animation:zUiMediaSettingsPopoverOut .16s cubic-bezier(.4,0,.2,1) forwards!important}.z-media-player-popover .bg-popover{background-color:transparent!important;color:#e4e4e7!important}.z-media-player-popover .z-media-player-settings{overflow:hidden;transform-origin:bottom right;animation:zUiMediaSettingsPanelIn .16s cubic-bezier(.2,.85,.25,1)}.z-media-player-popover .z-media-player-settings-panel{gap:4px;transform-origin:top right;animation:zUiMediaSettingsPanelIn .14s cubic-bezier(.2,.85,.25,1);will-change:opacity,transform}.z-media-player-popover .z-media-player-settings.z-main-panel .z-media-player-settings-panel{animation-name:zUiMediaSettingsPanelFromLeft}.z-media-player-popover .z-media-player-settings.z-sub-panel .z-media-player-settings-panel{animation-name:zUiMediaSettingsPanelFromRight}.z-media-player-popover .z-media-player-settings-item,.z-media-player-popover .z-media-player-settings-back{position:relative;display:flex;width:100%;min-width:0;height:32px;min-height:32px;cursor:pointer;align-items:center;border:0;border-radius:4px;background-color:transparent;padding:0 8px;color:#e4e4e7;font-size:12px;font-weight:500;line-height:1;outline:none;transition:background-color .12s ease,color .12s ease}.z-media-player-popover .z-media-player-settings-item{justify-content:space-between;gap:12px;text-align:left}.z-media-player-popover .z-media-player-settings-item:before{position:absolute;top:7px;bottom:7px;left:0;width:2px;border-radius:9999px;background-color:#fff;content:\"\";opacity:0;transform:scaleY(.5);transition:opacity .12s ease,transform .12s ease}.z-media-player-popover .z-media-player-settings-item.z-active{background-color:#ffffff14;color:#fff;font-weight:600}.z-media-player-popover .z-media-player-settings-item.z-active:before{opacity:1;transform:scaleY(1)}.z-media-player-popover .z-media-player-settings-back{justify-content:flex-start;gap:8px;color:#f4f4f5;font-weight:600}.z-media-player-popover .z-media-player-settings-item:hover,.z-media-player-popover .z-media-player-settings-back:hover,.z-media-player-popover .z-media-player-settings-item:focus-visible,.z-media-player-popover .z-media-player-settings-back:focus-visible{background-color:#ffffff1a}@keyframes zUiMediaSettingsPopoverIn{0%{opacity:0;transform:translateY(6px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes zUiMediaSettingsPopoverOut{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(4px) scale(.96)}}@keyframes zUiMediaSettingsPanelIn{0%{opacity:0;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}@keyframes zUiMediaSettingsPanelFromRight{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}@keyframes zUiMediaSettingsPanelFromLeft{0%{opacity:0;transform:translate(-5px)}to{opacity:1;transform:translate(0)}}\n"] }]
651
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSrc", required: true }] }], zSources: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSources", required: false }] }], zPoster: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPoster", required: false }] }], zAutoplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAutoplay", required: false }] }], zLoop: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLoop", required: false }] }], zMuted: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMuted", required: false }] }], zVolume: [{ type: i0.Input, args: [{ isSignal: true, alias: "zVolume", required: false }] }], zSubtitles: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSubtitles", required: false }] }], zPlay: [{ type: i0.Output, args: ["zPlay"] }], zTimeUpdate: [{ type: i0.Output, args: ["zTimeUpdate"] }], zVolumeChange: [{ type: i0.Output, args: ["zVolumeChange"] }], zFullscreenChange: [{ type: i0.Output, args: ["zFullscreenChange"] }], zTheaterModeChange: [{ type: i0.Output, args: ["zTheaterModeChange"] }], zMiniplayerChange: [{ type: i0.Output, args: ["zMiniplayerChange"] }], zQualityChange: [{ type: i0.Output, args: ["zQualityChange"] }], videoElement: [{ type: i0.ViewChild, args: ['videoElement', { isSignal: true }] }], timelineContainer: [{ type: i0.ViewChild, args: ['timelineContainer', { isSignal: true }] }] } });
652
+
653
+ /**
654
+ * Generated bundle index. Do not edit.
655
+ */
656
+
657
+ export { ZMediaPlayerComponent };
658
+ //# sourceMappingURL=shival99-z-ui-components-z-media-player.mjs.map