Skip to content
Open
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
16 changes: 9 additions & 7 deletions vendor/assets/javascripts/mediaelement-and-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -2338,12 +2338,13 @@ Object.assign(_player2.default.prototype, {
}

for (var _i4 = 0, _total2 = outEvents.length; _i4 < _total2; _i4++) {
// add a small timeout so mobile devices can activate the buttons before focus is lost
setTimeout(function () {
player.captionsButton.addEventListener(outEvents[_i4], function () {
(0, _dom.addClass)(this.querySelector('.' + t.options.classPrefix + 'captions-selector'), t.options.classPrefix + 'offscreen');
});
}, 20);
player.captionsButton.addEventListener(outEvents[_i4], function () {
var self = this;
// add a small timeout so mobile devices can activate the buttons before focus is lost
setTimeout(function () {
(0, _dom.addClass)(self.querySelector('.' + t.options.classPrefix + 'captions-selector'), t.options.classPrefix + 'offscreen');
}, 20);
});
}

for (var _i5 = 0, _total3 = captions.length; _i5 < _total3; _i5++) {
Expand Down Expand Up @@ -2379,9 +2380,10 @@ Object.assign(_player2.default.prototype, {

for (var _i8 = 0, _total6 = outEvents.length; _i8 < _total6; _i8++) {
player.chaptersButton.addEventListener(outEvents[_i8], function () {
var self = this;
// add a small timeout so mobile devices can activate the buttons before focus is lost
setTimeout(function () {
(0, _dom.addClass)(this.querySelector('.' + t.options.classPrefix + 'chapters-selector'), t.options.classPrefix + 'offscreen');
(0, _dom.addClass)(self.querySelector('.' + t.options.classPrefix + 'chapters-selector'), t.options.classPrefix + 'offscreen');
}, 20);
});
}
Expand Down