vidply 1.0.3 → 1.0.5

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
@@ -2,21 +2,44 @@
2
2
 
3
3
  **Universal, Accessible Video & Audio Player**
4
4
 
5
- A modern, feature-rich video player built with vanilla ES6 JavaScript. Combines the best accessibility features from AblePlayer with the streaming capabilities of MediaElement.js.
5
+ A modern, feature-rich media player built with vanilla ES6 JavaScript. Combines the best accessibility features from AblePlayer with the streaming capabilities of MediaElement.js. Fully internationalized with support for 5 languages and complete WCAG 2.1 AA compliance.
6
6
 
7
7
  ![License](https://img.shields.io/badge/license-GPL--2.0--or--later-blue.svg)
8
8
  ![ES6](https://img.shields.io/badge/ES6-Module-yellow.svg)
9
9
  ![WCAG](https://img.shields.io/badge/WCAG-2.1%20AA-green.svg)
10
+ ![Version](https://img.shields.io/badge/version-1.0.4-brightgreen.svg)
11
+
12
+ ## Live Demos
13
+
14
+ Try VidPly in action:
15
+ - **[Main Demo](https://matthiaspeltzer.github.io/vidply/demo/demo.html)** - Full-featured video player showcase
16
+ - **[Audio Playlist](https://matthiaspeltzer.github.io/vidply/demo/playlist-audio.html)** - Audio player with playlist support
17
+ - **[Video Playlist](https://matthiaspeltzer.github.io/vidply/demo/playlist-video.html)** - Video playlist with thumbnails
18
+ - **[HLS Streaming](https://matthiaspeltzer.github.io/vidply/demo/hls-test.html)** - Adaptive bitrate streaming demo
19
+ - **[Sign Language](https://matthiaspeltzer.github.io/vidply/demo/sign-language-demo.html)** - Sign language overlay demo
20
+
21
+ ## Why VidPly?
22
+
23
+ - **Zero Dependencies** - Pure vanilla JavaScript, no frameworks required
24
+ - **Accessibility First** - WCAG 2.1 AA compliant with full keyboard and screen reader support
25
+ - **Multilingual** - Built-in translations for 5 languages with easy extensibility
26
+ - **Fully Customizable** - CSS variables and comprehensive API
27
+ - **Modern Build** - ES6 modules with tree-shaking support
28
+ - **Production Ready** - Thoroughly tested with real-world media content
10
29
 
11
30
  ## Features
12
31
 
13
32
  ### Core Media Support
14
- - **Audio & Video Playback** - Native HTML5 support
15
- - **Multiple Formats** - MP3, OGG, WAV, MP4, WebM
16
- - **YouTube Integration** - Embed with unified controls
17
- - **Vimeo Integration** - Seamless Vimeo support
18
- - **HLS Streaming** - Adaptive bitrate streaming
19
- - **Playlists** - Audio/video playlist support
33
+ - **Audio & Video Playback** - Native HTML5 support for both media types
34
+ - **Multiple Formats** - MP3, OGG, WAV (audio) / MP4, WebM (video)
35
+ - **YouTube Integration** - Embed YouTube videos with unified controls
36
+ - **Vimeo Integration** - Seamless Vimeo player integration
37
+ - **HLS Streaming** - Adaptive bitrate streaming with quality selection
38
+ - **Playlists** - Full playlist support with auto-advance and navigation
39
+ - Audio playlists with track info
40
+ - Video playlists with thumbnails
41
+ - Previous/Next controls
42
+ - Visual playlist panel
20
43
 
21
44
  ### Accessibility Features
22
45
  - **Full Keyboard Navigation** - WCAG 2.1 compliant
@@ -46,13 +69,21 @@ A modern, feature-rich video player built with vanilla ES6 JavaScript. Combines
46
69
  - **Picture-in-Picture** - PiP support
47
70
 
48
71
  ### Internationalization
49
- Built-in support for:
50
- - English
51
- - Spanish
52
- - French
53
- - German
54
- - Japanese
55
- - Easy to add more languages
72
+ Built-in support for 5 languages:
73
+ - 🇬🇧 English
74
+ - 🇪🇸 Spanish (Español)
75
+ - 🇫🇷 French (Français)
76
+ - 🇩🇪 German (Deutsch)
77
+ - 🇯🇵 Japanese (日本語)
78
+
79
+ All UI elements are fully translated, including:
80
+ - Control buttons and menus
81
+ - Time display and duration formatting
82
+ - Keyboard shortcuts
83
+ - Error messages and notifications
84
+ - ARIA labels for screen readers
85
+
86
+ Easy to add more languages via the i18n system
56
87
 
57
88
  ## Installation
58
89
 
@@ -363,6 +394,52 @@ player.disableSignLanguage() // Hide sign language overlay
363
394
  player.toggleSignLanguage() // Toggle sign language
364
395
  ```
365
396
 
397
+ ### Playlists
398
+
399
+ ```javascript
400
+ import { Player, PlaylistManager } from './dist/vidply.esm.js';
401
+
402
+ // Create player
403
+ const player = new Player('#my-player');
404
+
405
+ // Create playlist manager
406
+ const playlist = new PlaylistManager(player, {
407
+ autoAdvance: true, // Auto-play next track
408
+ loop: false, // Loop back to start
409
+ showPanel: true // Show playlist UI
410
+ });
411
+
412
+ // Load tracks
413
+ playlist.loadPlaylist([
414
+ {
415
+ src: 'track1.mp3',
416
+ title: 'Track 1',
417
+ artist: 'Artist Name',
418
+ poster: 'thumb1.jpg'
419
+ },
420
+ {
421
+ src: 'track2.mp3',
422
+ title: 'Track 2',
423
+ artist: 'Artist Name',
424
+ tracks: [
425
+ { src: 'captions.vtt', kind: 'captions', srclang: 'en' }
426
+ ]
427
+ }
428
+ ]);
429
+
430
+ // Control playlist
431
+ playlist.next() // Go to next track
432
+ playlist.previous() // Go to previous track
433
+ playlist.goToTrack(2) // Jump to specific track
434
+ playlist.hasNext() // Check if next track exists
435
+ playlist.hasPrevious() // Check if previous track exists
436
+
437
+ // Listen for track changes
438
+ player.on('playlisttrackchange', (e) => {
439
+ console.log('Now playing:', e.item.title);
440
+ });
441
+ ```
442
+
366
443
  ### Settings
367
444
 
368
445
  ```javascript
@@ -482,7 +559,7 @@ See [BUILD.md](docs/BUILD.md) for detailed build documentation.
482
559
 
483
560
  GNU General Public License v2.0 or later
484
561
 
485
- Copyright (C) 2024 Matthias Peltzer
562
+ Copyright (C) 2025 Matthias Peltzer
486
563
 
487
564
  This program is free software; you can redistribute it and/or modify
488
565
  it under the terms of the GNU General Public License as published by
@@ -495,16 +572,15 @@ See [LICENSE](LICENSE) for full license text.
495
572
 
496
573
  Contributions are welcome! Please feel free to submit a Pull Request.
497
574
 
498
- ## Support
575
+ ## Documentation
499
576
 
500
- - Getting Started: See [GETTING_STARTED.md](docs/GETTING_STARTED.md)
501
- - Usage Examples: See [USAGE.md](docs/USAGE.md)
502
- - Playlist Guide: See [PLAYLIST.md](docs/PLAYLIST.md)
503
- - Transcript Guide: See [TRANSCRIPT.md](docs/TRANSCRIPT.md)
504
- - Build Guide: See [BUILD.md](docs/BUILD.md)
505
- - Changelog: See [CHANGELOG.md](docs/CHANGELOG.md)
506
- - Issues: Report on GitHub
507
- - Discussions: GitHub Discussions
577
+ - [Getting Started Guide](docs/GETTING_STARTED.md) - Basic setup and usage
578
+ - [Usage Guide](docs/USAGE.md) - Detailed usage examples
579
+ - [Playlist Guide](docs/PLAYLIST.md) - Audio/video playlists
580
+ - [Transcript Guide](docs/TRANSCRIPT.md) - Interactive transcripts
581
+ - [Keyboard Shortcuts](docs/KEYBOARD.md) - Complete keyboard reference
582
+ - [Build Guide](docs/BUILD.md) - Build system and development
583
+ - [Changelog](docs/CHANGELOG.md) - Version history and updates
508
584
 
509
585
  ## Credits
510
586
 
package/dist/vidply.css CHANGED
@@ -1393,6 +1393,8 @@
1393
1393
  }
1394
1394
 
1395
1395
  .vidply-playlist-list {
1396
+ list-style: none;
1397
+ margin: 0;
1396
1398
  padding: 4px 0;
1397
1399
  }
1398
1400
 
@@ -1405,6 +1407,7 @@
1405
1407
  display: flex;
1406
1408
  gap: 12px;
1407
1409
  padding: 12px 16px;
1410
+ position: relative;
1408
1411
  transition: all 0.2s ease;
1409
1412
  }
1410
1413
 
@@ -1416,9 +1419,23 @@
1416
1419
  .vidply-playlist-item:focus {
1417
1420
  background: var(--vidply-white-08);
1418
1421
  border-left-color: var(--vidply-primary);
1422
+ outline: 2px solid var(--vidply-primary-light);
1423
+ outline-offset: -2px;
1424
+ z-index: 1;
1425
+ }
1426
+
1427
+ .vidply-playlist-item:focus:not(:focus-visible) {
1419
1428
  outline: none;
1420
1429
  }
1421
1430
 
1431
+ .vidply-playlist-item:focus-visible {
1432
+ background: var(--vidply-white-08);
1433
+ border-left-color: var(--vidply-primary);
1434
+ outline: 2px solid var(--vidply-primary-light);
1435
+ outline-offset: -2px;
1436
+ z-index: 1;
1437
+ }
1438
+
1422
1439
  .vidply-playlist-item-active {
1423
1440
  background: var(--vidply-primary-15);
1424
1441
  border-left-color: var(--vidply-primary);
@@ -1428,6 +1445,13 @@
1428
1445
  background: var(--vidply-primary-20);
1429
1446
  }
1430
1447
 
1448
+ .vidply-playlist-item-active:focus,
1449
+ .vidply-playlist-item-active:focus-visible {
1450
+ background: var(--vidply-primary-20);
1451
+ outline: 2px solid var(--vidply-primary-light);
1452
+ outline-offset: -2px;
1453
+ }
1454
+
1431
1455
  /* Playlist Thumbnail */
1432
1456
  .vidply-playlist-thumbnail {
1433
1457
  align-items: center;