diff --git a/CHANGELOG.md b/CHANGELOG.md
index 82c747f36..5245a38f2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+
+## [8.19.2](https://github.com/videojs/video.js/compare/v8.19.1...v8.19.2) (2024-11-14)
+
+### Bug Fixes
+
+* change http to https in examples ([#8905](https://github.com/videojs/video.js/issues/8905)) ([079cbe1](https://github.com/videojs/video.js/commit/079cbe1))
+* Fix Escape handling in menus ([#8916](https://github.com/videojs/video.js/issues/8916)) ([d0cf139](https://github.com/videojs/video.js/commit/d0cf139))
+* **text-track-settings:** localization not correctly applied ([#8904](https://github.com/videojs/video.js/issues/8904)) ([ecef37c](https://github.com/videojs/video.js/commit/ecef37c))
+
## [8.19.1](https://github.com/videojs/video.js/compare/v8.19.0...v8.19.1) (2024-10-10)
diff --git a/README.md b/README.md
index 1dbfe266a..eb158e376 100644
--- a/README.md
+++ b/README.md
@@ -22,8 +22,8 @@ Video.js was started in the middle of 2010 and is now used on over ~~50,000~~ ~~
Thanks to the awesome folks over at [Fastly][fastly], there's a free, CDN hosted version of Video.js that anyone can use. Add these tags to your document's `
`:
```html
-
-
+
+
```
Alternatively, you can include Video.js by getting it from [npm](https://videojs.com/getting-started/#install-via-npm), downloading it from [GitHub releases](https://github.com/videojs/video.js/releases) or by including it via [unpkg](https://unpkg.com) or another JavaScript CDN, like CDNjs.
@@ -34,12 +34,12 @@ Alternatively, you can include Video.js by getting it from [npm](https://videojs
-
-
+
+
-
-
+
+
```
Next, using Video.js is as simple as creating a `` element, but with an additional `data-setup` attribute. At a minimum, this attribute must have a value of `'{}'`, but it can include any Video.js [options][options] - just make sure it contains valid JSON!
diff --git a/docs/examples/elephantsdream/index.html b/docs/examples/elephantsdream/index.html
index 808171ee5..832885303 100644
--- a/docs/examples/elephantsdream/index.html
+++ b/docs/examples/elephantsdream/index.html
@@ -5,8 +5,8 @@
Video.js Text Descriptions, Chapters & Captions Example
-
-
+
+
diff --git a/docs/examples/simple-embed/index.html b/docs/examples/simple-embed/index.html
index 5f109248d..e2b44a86b 100644
--- a/docs/examples/simple-embed/index.html
+++ b/docs/examples/simple-embed/index.html
@@ -10,9 +10,9 @@
-
-
-
+
+
+
To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video
diff --git a/package-lock.json b/package-lock.json
index 080a88798..42c45f6ef 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "video.js",
- "version": "8.19.1",
+ "version": "8.19.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 75fa1cf37..aedbb4386 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "video.js",
"description": "An HTML5 video player that supports HLS and DASH with a common API and skin.",
- "version": "8.19.1",
+ "version": "8.19.2",
"main": "./dist/video.cjs.js",
"module": "./dist/video.es.js",
"style": "./dist/video-js.css",
diff --git a/src/js/menu/menu-button.js b/src/js/menu/menu-button.js
index 73fecada3..7672779bd 100644
--- a/src/js/menu/menu-button.js
+++ b/src/js/menu/menu-button.js
@@ -297,7 +297,7 @@ class MenuButton extends Component {
handleKeyDown(event) {
// Escape or Tab unpress the 'button'
- if (event.key === 'Esc' || event.key === 'Tab') {
+ if (event.key === 'Escape' || event.key === 'Tab') {
if (this.buttonPressed_) {
this.unpressButton();
}
@@ -328,7 +328,7 @@ class MenuButton extends Component {
*/
handleMenuKeyUp(event) {
// Escape hides popup menu
- if (event.key === 'Esc' || event.key === 'Tab') {
+ if (event.key === 'Escape' || event.key === 'Tab') {
this.removeClass('vjs-hover');
}
}
@@ -356,7 +356,7 @@ class MenuButton extends Component {
*/
handleSubmenuKeyDown(event) {
// Escape or Tab unpress the 'button'
- if (event.key === 'Esc' || event.key === 'Tab') {
+ if (event.key === 'Escape' || event.key === 'Tab') {
if (this.buttonPressed_) {
this.unpressButton();
}
diff --git a/src/js/tracks/text-track-fieldset.js b/src/js/tracks/text-track-fieldset.js
index b8f69df9f..945c21cf6 100644
--- a/src/js/tracks/text-track-fieldset.js
+++ b/src/js/tracks/text-track-fieldset.js
@@ -87,7 +87,7 @@ class TextTrackFieldset extends Component {
const label = Dom.createEl('label', {
id,
className: 'vjs-label',
- textContent: selectConfig.label
+ textContent: this.localize(selectConfig.label)
});
label.setAttribute('for', guid);
diff --git a/src/js/tracks/text-track-select.js b/src/js/tracks/text-track-select.js
index 288bc55b7..99bb538ee 100644
--- a/src/js/tracks/text-track-select.js
+++ b/src/js/tracks/text-track-select.js
@@ -68,7 +68,7 @@ class TextTrackSelect extends Component {
{
id: optionId,
value: this.localize(optionText[0]),
- textContent: optionText[1]
+ textContent: this.localize(optionText[1])
}
);
diff --git a/test/unit/menu.test.js b/test/unit/menu.test.js
index bf47806b2..b07de00d4 100644
--- a/test/unit/menu.test.js
+++ b/test/unit/menu.test.js
@@ -235,7 +235,7 @@ QUnit.test('should remove old event listeners when the menu item adds to the new
assert.ok(clickListenerSpy.calledOnce, 'click event listener should be called');
assert.strictEqual(clickListenerSpy.getCall(0).args[0].target, menuItem.el(), 'event target should be the `menuItem`');
- assert.ok(unpressButtonSpy.calledOnce, '`menuButton`.`unpressButtion` has been called');
+ assert.ok(unpressButtonSpy.calledOnce, '`menuButton`.`unpressButton` has been called');
assert.ok(focusSpy.calledOnce, '`menuButton`.`focus` has been called');
unpressButtonSpy.restore();
@@ -265,3 +265,21 @@ QUnit.test('should remove old event listeners when the menu item adds to the new
oldMenu.dispose();
menuButton.dispose();
});
+
+QUnit.test('Escape should close menu', function(assert) {
+ const player = TestHelpers.makePlayer();
+ const menuButton = new MenuButton(player, {});
+ const unpressButtonSpy = sinon.spy(menuButton, 'unpressButton');
+
+ menuButton.createItems = () => [new MenuItem(player, {})];
+ menuButton.update();
+ menuButton.handleClick(new window.PointerEvent('click'));
+ menuButton.menu.children()[0].el_.dispatchEvent(new window.KeyboardEvent('keydown', {
+ key: 'Escape',
+ bubbles: true,
+ cancelable: true
+ }));
+
+ assert.ok(unpressButtonSpy.calledOnce, '`menuButton`.`unpressButton` has been called');
+
+});
diff --git a/test/unit/tracks/text-track-settings.test.js b/test/unit/tracks/text-track-settings.test.js
index e20a93664..1eec3e6ae 100644
--- a/test/unit/tracks/text-track-settings.test.js
+++ b/test/unit/tracks/text-track-settings.test.js
@@ -375,10 +375,16 @@ QUnit.test('should update on languagechange', function(assert) {
tracks
});
- videojs.addLanguage('test', {'Font Size': 'FONTSIZE'});
+ videojs.addLanguage('test', {
+ 'Font Size': 'FONTSIZE',
+ 'Color': 'COLOR',
+ 'White': 'WHITE'
+ });
player.language('test');
assert.equal(player.$('.vjs-font-percent legend').textContent, 'FONTSIZE', 'settings dialog updates on languagechange');
+ assert.equal(player.$('.vjs-text-color label').textContent, 'COLOR', 'settings dialog label updates on languagechange');
+ assert.equal(player.$('.vjs-text-color select option').textContent, 'WHITE', 'settings dialog select updates on languagechange');
player.dispose();
});