mirror of
https://github.com/videojs/video.js.git
synced 2024-12-23 02:04:34 +02:00
Merge branch 'main' into main
This commit is contained in:
commit
1384f7411e
@ -1,3 +1,12 @@
|
|||||||
|
<a name="8.19.2"></a>
|
||||||
|
## [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))
|
||||||
|
|
||||||
<a name="8.19.1"></a>
|
<a name="8.19.1"></a>
|
||||||
## [8.19.1](https://github.com/videojs/video.js/compare/v8.19.0...v8.19.1) (2024-10-10)
|
## [8.19.1](https://github.com/videojs/video.js/compare/v8.19.0...v8.19.1) (2024-10-10)
|
||||||
|
|
||||||
|
12
README.md
12
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 `<head>`:
|
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 `<head>`:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link href="//vjs.zencdn.net/8.19.1/video-js.min.css" rel="stylesheet">
|
<link href="//vjs.zencdn.net/8.19.2/video-js.min.css" rel="stylesheet">
|
||||||
<script src="//vjs.zencdn.net/8.19.1/video.min.js"></script>
|
<script src="//vjs.zencdn.net/8.19.2/video.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
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
|
|||||||
<script src="https://unpkg.com/video.js/dist/video.min.js"></script>
|
<script src="https://unpkg.com/video.js/dist/video.min.js"></script>
|
||||||
|
|
||||||
<!-- unpkg : use a specific version of Video.js (change the version numbers as necessary) -->
|
<!-- unpkg : use a specific version of Video.js (change the version numbers as necessary) -->
|
||||||
<link href="https://unpkg.com/video.js@8.19.1/dist/video-js.min.css" rel="stylesheet">
|
<link href="https://unpkg.com/video.js@8.19.2/dist/video-js.min.css" rel="stylesheet">
|
||||||
<script src="https://unpkg.com/video.js@8.19.1/dist/video.min.js"></script>
|
<script src="https://unpkg.com/video.js@8.19.2/dist/video.min.js"></script>
|
||||||
|
|
||||||
<!-- cdnjs : use a specific version of Video.js (change the version numbers as necessary) -->
|
<!-- cdnjs : use a specific version of Video.js (change the version numbers as necessary) -->
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/video.js/8.19.1/video-js.min.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/video.js/8.19.2/video-js.min.css" rel="stylesheet">
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/8.19.1/video.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/8.19.2/video.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
Next, using Video.js is as simple as creating a `<video>` 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!
|
Next, using Video.js is as simple as creating a `<video>` 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!
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>Video.js Text Descriptions, Chapters & Captions Example</title>
|
<title>Video.js Text Descriptions, Chapters & Captions Example</title>
|
||||||
|
|
||||||
<link href="http://vjs.zencdn.net/7.0/video-js.min.css" rel="stylesheet">
|
<link href="https://vjs.zencdn.net/7.0/video-js.min.css" rel="stylesheet">
|
||||||
<script src="http://vjs.zencdn.net/7.0/video.min.js"></script>
|
<script src="https://vjs.zencdn.net/7.0/video.min.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<video id="example_video_1" class="video-js" controls preload="none" width="640" height="264" poster="http://vjs.zencdn.net/v/oceans.png" data-setup="{}">
|
<video id="example_video_1" class="video-js" controls preload="none" width="640" height="264" poster="http://vjs.zencdn.net/v/oceans.png" data-setup="{}">
|
||||||
<source src="http://vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
|
<source src="https://vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
|
||||||
<source src="http://vjs.zencdn.net/v/oceans.webm" type="video/webm">
|
<source src="https://vjs.zencdn.net/v/oceans.webm" type="video/webm">
|
||||||
<source src="http://vjs.zencdn.net/v/oceans.ogv" type="video/ogg">
|
<source src="https://vjs.zencdn.net/v/oceans.ogv" type="video/ogg">
|
||||||
<track kind="captions" src="../shared/example-captions.vtt" srclang="en" label="English">
|
<track kind="captions" src="../shared/example-captions.vtt" srclang="en" label="English">
|
||||||
<track kind="subtitles" src="../shared/example-captions.vtt" srclang="en" label="English">
|
<track kind="subtitles" src="../shared/example-captions.vtt" srclang="en" label="English">
|
||||||
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
|
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "video.js",
|
"name": "video.js",
|
||||||
"version": "8.19.1",
|
"version": "8.19.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "video.js",
|
"name": "video.js",
|
||||||
"description": "An HTML5 video player that supports HLS and DASH with a common API and skin.",
|
"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",
|
"main": "./dist/video.cjs.js",
|
||||||
"module": "./dist/video.es.js",
|
"module": "./dist/video.es.js",
|
||||||
"style": "./dist/video-js.css",
|
"style": "./dist/video-js.css",
|
||||||
|
@ -297,7 +297,7 @@ class MenuButton extends Component {
|
|||||||
handleKeyDown(event) {
|
handleKeyDown(event) {
|
||||||
|
|
||||||
// Escape or Tab unpress the 'button'
|
// Escape or Tab unpress the 'button'
|
||||||
if (event.key === 'Esc' || event.key === 'Tab') {
|
if (event.key === 'Escape' || event.key === 'Tab') {
|
||||||
if (this.buttonPressed_) {
|
if (this.buttonPressed_) {
|
||||||
this.unpressButton();
|
this.unpressButton();
|
||||||
}
|
}
|
||||||
@ -328,7 +328,7 @@ class MenuButton extends Component {
|
|||||||
*/
|
*/
|
||||||
handleMenuKeyUp(event) {
|
handleMenuKeyUp(event) {
|
||||||
// Escape hides popup menu
|
// Escape hides popup menu
|
||||||
if (event.key === 'Esc' || event.key === 'Tab') {
|
if (event.key === 'Escape' || event.key === 'Tab') {
|
||||||
this.removeClass('vjs-hover');
|
this.removeClass('vjs-hover');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -356,7 +356,7 @@ class MenuButton extends Component {
|
|||||||
*/
|
*/
|
||||||
handleSubmenuKeyDown(event) {
|
handleSubmenuKeyDown(event) {
|
||||||
// Escape or Tab unpress the 'button'
|
// Escape or Tab unpress the 'button'
|
||||||
if (event.key === 'Esc' || event.key === 'Tab') {
|
if (event.key === 'Escape' || event.key === 'Tab') {
|
||||||
if (this.buttonPressed_) {
|
if (this.buttonPressed_) {
|
||||||
this.unpressButton();
|
this.unpressButton();
|
||||||
}
|
}
|
||||||
|
@ -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.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.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');
|
assert.ok(focusSpy.calledOnce, '`menuButton`.`focus` has been called');
|
||||||
|
|
||||||
unpressButtonSpy.restore();
|
unpressButtonSpy.restore();
|
||||||
@ -265,3 +265,21 @@ QUnit.test('should remove old event listeners when the menu item adds to the new
|
|||||||
oldMenu.dispose();
|
oldMenu.dispose();
|
||||||
menuButton.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');
|
||||||
|
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user