Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Able Player has been translated into the following languages.
<li><strong lang="pt-br">Português - Brasil</strong> (Portuguese - Brazil)</li>
<li><strong lang="nb">Norsk Bokmål</strong> (Norwegian)</li>
<li><strong lang="nl">Nederlands, Vlaams</strong> (Dutch)</li>
<li><strong lang="sk">Slovenčina</strong> (Slovak)</li>
<li><strong lang="sv">Svenska</strong> (Swedish)</li>
<li><strong lang="tr">Türkçe</strong> (Turkish)</li>
</ul>
Expand Down
4,962 changes: 2,651 additions & 2,311 deletions build/ableplayer.dist.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/ableplayer.dist.js.map

Large diffs are not rendered by default.

4,962 changes: 2,651 additions & 2,311 deletions build/ableplayer.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/ableplayer.esm.js.map

Large diffs are not rendered by default.

4,962 changes: 2,651 additions & 2,311 deletions build/ableplayer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/ableplayer.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/ableplayer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/ableplayer.min.js.map

Large diffs are not rendered by default.

4,962 changes: 2,651 additions & 2,311 deletions build/separate-dompurify/ableplayer.dist.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/separate-dompurify/ableplayer.dist.js.map

Large diffs are not rendered by default.

4,962 changes: 2,651 additions & 2,311 deletions build/separate-dompurify/ableplayer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/separate-dompurify/ableplayer.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/separate-dompurify/ableplayer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/separate-dompurify/ableplayer.min.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AblePlayer Changelog

## 5.0.0 May 28, 2026
## 5.0.0 June 21, 2026

### Features

Expand Down Expand Up @@ -45,6 +45,7 @@
- Fix prev/next item navigation in playlists.
- Display volume value as a percentage in all cases.
- Update seekbar width to be expressed in percentages.
- Fix handling of `data-lang` attribute so language is detected more consistently.

### Code cleanup

Expand All @@ -56,6 +57,7 @@

### Internationalization

- Added Slovak translation (props @rraddatch - Radoslav Ďurač)
- Updated Catalan translation (props @ralcarazm)
- Updated Dutch translation (props @rianrietveld)

Expand Down
14 changes: 14 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ Also in 5.0.0, we build TypeScript type definitions, to aid IDE development with
- **build/ableplayer.esm.d.ts** - Type definitions
- **build/ableplayer.esm.d.ts.map** - Source map to improve "go to definition" behavior in IDEs

## Automated Testing

Able Player uses [Jest][] to run automated tests. Tests are found in `scripts/__tests__`. Currently, the test suite is fairly small, but expanding the test suite is a high priority.

```sh
# Run Test Suite
npm test
```

Because Able Player doesn't configure its own local environment, you can run it in any local setup; but you may need to adjust the test runner's target URL for tests requiring a local URL. The default is `http://localhost:8000`.

Please run the test suite against your changes to ensure there are no unexpected changes.

## Code of Conduct

All contributors to Able Player are expected to follow our [published Code of Conduct](https://github.com/ableplayer/ableplayer/blob/main/code-of-conduct.md).
Expand All @@ -80,3 +93,4 @@ All contributors to Able Player are expected to follow our [published Code of Co
[develop]: https://github.com/ableplayer/ableplayer/tree/develop
[donate]: https://www.joedolson.com/donate/
[Existing translations]: https://github.com/ableplayer/ableplayer/blob/develop/translations/
[Jest]: https://jestjs.io/
1 change: 1 addition & 0 deletions demos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ <h2>Localized Examples</h2>
<li><a href="local-fr.html">French Player</a></li>
<li><a href="local-de.html">German Player</a></li>
<li><a href="local-ja.html">Japanese Player</a></li>
<li><a href="local-sk.html">Slovak Player</a></li>
<li><a href="local-es.html">Spanish Player</a></li>
</ul>

Expand Down
46 changes: 46 additions & 0 deletions demos/local-sk.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="sk">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Able Player po slovensky | Able Player Demos</title>
<link rel="stylesheet" href="demos.css" type="text/css">

<!-- Dependencies -->
<script src="https://code.jquery.com/jquery-3.7.1.slim.min.js" integrity="sha256-kmHvs0B+OpCW5GVHUNjv9rOmY0IvSIRcf7zGUDTDQM8=" crossorigin="anonymous"></script>

<!-- Able Player CSS -->
<link rel="stylesheet" href="../build/ableplayer.min.css" type="text/css"/>

<!-- Able Player JavaScript -->
<script src="../build/ableplayer.dist.js"></script>

</head>

<body>
<header lang="en">
<div class="title">Able Player Demos</div>
</header>
<nav lang="en">
<ul>
<li><a href="index.html">More demos</a></li>
<li><a href="https://ableplayer.github.io/ableplayer">Able Player Docs</a></li>
</ul>
</nav>
<main>
<h1>Able Player po slovensky</h1>
<div id="container">
<video id="video1" preload="auto" poster="../media/wwa.jpg" data-able-player data-lang="sk" playsinline>
<source type="video/mp4" src="../media/wwa.mp4" data-desc-src="../media/wwa_described.mp4" data-sign-src="../media/wwa_sign.mp4"/>
<source type="video/webm" src="../media/wwa.webm" data-desc-src="../media/wwa_described.webm" data-sign-src="../media/wwa_sign.webm"/>
<track kind="captions" src="../media/wwa_captions_sk.vtt" srclang="sk" label="Slovenčina" default/>
<track kind="captions" src="../media/wwa_captions_en.vtt" srclang="en" label="English"/>
<track kind="descriptions" src="../media/wwa_description_sk.vtt" srclang="sk"/>
<track kind="descriptions" src="../media/wwa_description_en.vtt" srclang="en"/>
<track kind="chapters" src="../media/wwa_chapters_sk.vtt" srclang="sk"/>
<track kind="chapters" src="../media/wwa_chapters_en.vtt" srclang="en"/>
</video>
</div>
</main>
</body>
</html>
68 changes: 68 additions & 0 deletions media/wwa_captions_sk.vtt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
WEBVTT
kind: captions
lang: sk

NOTE Tento VTT súbor obsahuje niekoľko špeciálnych prvkov:
- Metadáta v záhlaví (riadky 2 a 3)
- Aktuálny blok komentára, označený NOTE a obklopený prázdnymi riadkami
- Nastavenia stopy na konci prvého časového razítka
- Rozsah stopy na začiatku druhej stopy
- (v tomto prípade „voice span" <v> identifikujúci hovoriaceho)
- Zoznam nastavení stopy WebVTT za časovým razítkom na 39.132
- AblePlayer momentálne tieto rozšírené funkcie nepodporuje,
- ale parser ich musí vedieť filtrovať

00:00:00.429 --> 00:00:09.165
[ hudba ]

00:00:09.165 --> 00:00:10.792
<v Rozprávač> Títo ľudia sú pre vás <i>dôležití</i>.

00:00:10.792 --> 00:00:13.759
<b>Objednávajú</b> vaše produkty,
<b>registrujú sa</b> do vašich služieb,

00:00:13.759 --> 00:00:16.627
<b>zapisujú sa</b> do vašich kurzov,
<b>čítajú</b> vaše názory,

00:00:16.627 --> 00:00:18.561
a <b>sledujú</b> vaše videá.

00:00:18.561 --> 00:00:24.165
Nikdy ich neuvidíte, ale oni vás poznajú –
cez vašu webovú stránku.

00:00:24.165 --> 00:00:25.891
Alebo možno nie.

00:00:25.891 --> 00:00:30.396
<c.quotable>Návštevníci vašej webovej stránky nie sú
bezmenná masa rovnakých klikáčov myšou</c>

00:00:30.396 --> 00:00:32.363
ale živá
komunita jednotlivcov

00:00:32.363 --> 00:00:35.297
s rôznymi vkusmi,
štýlmi a schopnosťami.

00:00:35.297 --> 00:00:36.900
Patrí sem aj ľudia so zdravotným postihnutím.

00:00:39.132 --> 00:00:41.000 position:10%,start align:start size:35%
<v Terrill> Je dôležité, aby weboví
dizajnéri a vývojári

00:00:41.000 --> 00:00:45.500
si uvedomili, že to, čo vidia
momentálne na svojom počítači,

00:00:45.500 --> 00:00:49.264
pri svojom rozlíšení, s ich prehliadačom
a operačným systémom

00:00:49.264 --> 00:00:52.000
nemusí byť nevyhnutne
to isté, čo vidia všetci ostatní.
9 changes: 9 additions & 0 deletions media/wwa_chapters_sk.vtt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
WEBVTT

Chapter 1
00:00:00.000 --> 00:00:37.000
Úvod

Chapter 2
00:00:37.000 --> 00:01:00.000
Terrill Thompson
13 changes: 13 additions & 0 deletions media/wwa_description_sk.vtt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
WEBVTT

00:00:00.005 --> 00:00:04.000
Modrý kruh s pármi oblúkovitých kriviek vo vnútri.
Pod ním nápis DO-IT.

00:00:06.000 --> 00:00:10.000
V bielom poli sa objavia slová:
World Wide Access.

00:00:37.100 --> 00:00:39.000
Terrill Thompson,
špecialista na technologickú prístupnosť
10 changes: 7 additions & 3 deletions scripts/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import nl from '../translations/nl.json';
import pl from '../translations/pl.json';
import pt_br from '../translations/pt-br.json';
import pt from '../translations/pt.json';
import sk from '../translations/sk.json';
import sv from '../translations/sv.json';
import tr from '../translations/tr.json';
import zh_tw from '../translations/zh-tw.json';
Expand All @@ -38,6 +39,7 @@ const moduleFromTag = {
pl,
pt,
'pt-BR': pt_br,
sk,
sv,
tr,
'zh-TW': zh_tw,
Expand All @@ -64,6 +66,7 @@ function addTranslationFunctions(AblePlayer) {
'pl' : 'Polish',
'pt' : 'Portuguese',
'pt-BR' : 'Brazilian Portuguese',
'sk' : 'Slovak',
'sv' : 'Swedish',
'tr' : 'Turkish',
'zh-TW' : 'Chinese (Taiwan)'
Expand Down Expand Up @@ -106,8 +109,9 @@ function addTranslationFunctions(AblePlayer) {
supportedLangs = this.getSupportedLangs(); // returns an array

if (this.lang) { // a data-lang attribute is included on the media element
if ( Object.hasOwn( supportedLangs,this.lang ) ) {
// the specified language is not supported
var thisLang = this.lang;
if ( ! Object.hasOwn( supportedLangs,this.lang ) ) {
// the specified language code is not in the index
if ( this.lang.indexOf('-') == 2 ) {
// this is a localized lang attribute (e.g., fr-CA)
// try the parent language, given the first two characters
Expand All @@ -120,7 +124,7 @@ function addTranslationFunctions(AblePlayer) {
similarLangFound = false;
for ( const [key,value] of Object.entries(supportedLangs) ) {
if ( key.substring(0,2) == this.lang ) {
this.lang = value;
this.lang = key;
similarLangFound = true;
}
}
Expand Down
Loading