Skip to content

Commit

Permalink
Merge branch 'master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	build/mediaelement-and-player.min.js
#	build/mediaelement.min.js
  • Loading branch information
nholtman committed Sep 16, 2024
2 parents 6f3fd69 + 0026d05 commit 1a5b0e0
Show file tree
Hide file tree
Showing 13 changed files with 119 additions and 121 deletions.
37 changes: 6 additions & 31 deletions build/mediaelement-and-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de

var mejs = {};

mejs.version = '7.0.3';
mejs.version = '7.0.5';

mejs.html5media = {
properties: ['volume', 'src', 'currentTime', 'muted', 'duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable', 'currentSrc', 'preload', 'bufferedBytes', 'bufferedTime', 'initialTime', 'startOffsetTime', 'defaultPlaybackRate', 'playbackRate', 'played', 'autoplay', 'loop', 'controls'],
Expand Down Expand Up @@ -2443,13 +2443,12 @@ Object.assign(_player2.default.prototype, {

if (t.options.toggleCaptionsButtonWhenOnlyOne && subtitles.length === 1) {
player.captionsButton.classList.add(t.options.classPrefix + 'captions-button-toggle');
player.captionsButton.addEventListener('click', function (e) {
player.captionsButton.addEventListener('click', function () {
var trackId = 'none';
if (player.selectedTrack === null) {
trackId = player.getSubtitles()[0].trackId;
}
var keyboard = e.keyCode || e.which;
player.setTrack(trackId, typeof keyboard !== 'undefined');
player.setTrack(trackId);
});
} else {
var labels = player.captionsButton.querySelectorAll('.' + t.options.classPrefix + 'captions-selector-label'),
Expand All @@ -2473,9 +2472,8 @@ Object.assign(_player2.default.prototype, {

for (var _i3 = 0; _i3 < captions.length; _i3++) {
captions[_i3].addEventListener('click', function (e) {
var keyboard = e.keyCode || e.which;
if (!e.target.disabled) {
player.setTrack(this.value, typeof keyboard !== 'undefined');
player.setTrack(this.value);
}
});
}
Expand Down Expand Up @@ -2682,7 +2680,7 @@ Object.assign(_player2.default.prototype, {
}
}
},
setTrack: function setTrack(trackId, setByKeyboard) {
setTrack: function setTrack(trackId) {
var t = this,
radios = t.captionsButton.querySelectorAll('input[type="radio"]'),
captions = t.captionsButton.querySelectorAll('.' + t.options.classPrefix + 'captions-selected'),
Expand Down Expand Up @@ -2722,12 +2720,6 @@ Object.assign(_player2.default.prototype, {
var event = (0, _general.createEvent)('captionschange', t.media);
event.detail.caption = t.selectedTrack;
t.media.dispatchEvent(event);

if (!setByKeyboard) {
setTimeout(function () {
t.getElement(t.container).focus();
}, 500);
}
},
hideAllTracks: function hideAllTracks() {
if (this.node.textTracks) {
Expand Down Expand Up @@ -6811,24 +6803,7 @@ var IS_FIREFOX = exports.IS_FIREFOX = /firefox/i.test(UA);
var IS_SAFARI = exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME;
var IS_STOCK_ANDROID = exports.IS_STOCK_ANDROID = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA);
var HAS_MSE = exports.HAS_MSE = 'MediaSource' in _window2.default;
var SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = function () {
var element = _document2.default.createElement('x'),
documentElement = _document2.default.documentElement,
getComputedStyle = _window2.default.getComputedStyle;

if (!('pointerEvents' in element.style)) {
return false;
}

element.style.pointerEvents = 'auto';
element.style.pointerEvents = 'x';
documentElement.appendChild(element);
var supports = getComputedStyle && (getComputedStyle(element, '') || {}).pointerEvents === 'auto';
element.remove();
return !!supports;
}();

var SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () {
var SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = true;var SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () {
var supportsPassive = false;
try {
var opts = Object.defineProperty({}, 'passive', {
Expand Down
2 changes: 1 addition & 1 deletion build/mediaelement-and-player.min.js

Large diffs are not rendered by default.

21 changes: 2 additions & 19 deletions build/mediaelement.js
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de

var mejs = {};

mejs.version = '7.0.3';
mejs.version = '7.0.5';

mejs.html5media = {
properties: ['volume', 'src', 'currentTime', 'muted', 'duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable', 'currentSrc', 'preload', 'bufferedBytes', 'bufferedTime', 'initialTime', 'startOffsetTime', 'defaultPlaybackRate', 'playbackRate', 'played', 'autoplay', 'loop', 'controls'],
Expand Down Expand Up @@ -2604,24 +2604,7 @@ var IS_FIREFOX = exports.IS_FIREFOX = /firefox/i.test(UA);
var IS_SAFARI = exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME;
var IS_STOCK_ANDROID = exports.IS_STOCK_ANDROID = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA);
var HAS_MSE = exports.HAS_MSE = 'MediaSource' in _window2.default;
var SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = function () {
var element = _document2.default.createElement('x'),
documentElement = _document2.default.documentElement,
getComputedStyle = _window2.default.getComputedStyle;

if (!('pointerEvents' in element.style)) {
return false;
}

element.style.pointerEvents = 'auto';
element.style.pointerEvents = 'x';
documentElement.appendChild(element);
var supports = getComputedStyle && (getComputedStyle(element, '') || {}).pointerEvents === 'auto';
element.remove();
return !!supports;
}();

var SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () {
var SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = true;var SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () {
var supportsPassive = false;
try {
var opts = Object.defineProperty({}, 'passive', {
Expand Down
2 changes: 1 addition & 1 deletion build/mediaelement.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/renderers/youtube.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de

var mejs = {};

mejs.version = '7.0.3';
mejs.version = '7.0.5';

mejs.html5media = {
properties: ['volume', 'src', 'currentTime', 'muted', 'duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable', 'currentSrc', 'preload', 'bufferedBytes', 'bufferedTime', 'initialTime', 'startOffsetTime', 'defaultPlaybackRate', 'playbackRate', 'played', 'autoplay', 'loop', 'controls'],
Expand Down
2 changes: 1 addition & 1 deletion build/renderers/youtube.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Version History

*7.0.5* (2024/04/26)
* Fixed wrong focus on load when using default subtitles ([#2958](https://github.com/mediaelement/mediaelement/pull/2958))

*7.0.4* (2024/04/25)
* Fixed wrong focus on load when using default subtitles([#2957](https://github.com/mediaelement/mediaelement/pull/2957)) @Necxes
* Improved performance by eliminating a test logic event ([#2954](https://github.com/mediaelement/mediaelement/pull/2954)) @westonruter

*7.0.3* (2024/01/29)
* HLS and MPEG-Dash renderer should now have working captions, when loaded initially.
* Updated `demo/index.html` for easier debugging.
Expand Down
Loading

0 comments on commit 1a5b0e0

Please sign in to comment.