WIP
This commit is contained in:
parent
715b88c09b
commit
9e1218547b
23
dist/plyr.js
vendored
23
dist/plyr.js
vendored
@ -1957,6 +1957,7 @@ typeof navigator === "object" && (function (global, factory) {
|
|||||||
|
|
||||||
// Menu required
|
// Menu required
|
||||||
if (!is.element(this.elements.settings.panels.quality)) {
|
if (!is.element(this.elements.settings.panels.quality)) {
|
||||||
|
console.warn('Not an element');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1971,6 +1972,7 @@ typeof navigator === "object" && (function (global, factory) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Toggle the pane and tab
|
// Toggle the pane and tab
|
||||||
|
console.warn(this.options.quality);
|
||||||
var toggle = !is.empty(this.options.quality) && this.options.quality.length > 1;
|
var toggle = !is.empty(this.options.quality) && this.options.quality.length > 1;
|
||||||
controls.toggleMenuButton.call(this, type, toggle);
|
controls.toggleMenuButton.call(this, type, toggle);
|
||||||
|
|
||||||
@ -2387,7 +2389,10 @@ typeof navigator === "object" && (function (global, factory) {
|
|||||||
toggleHidden(target, false);
|
toggleHidden(target, false);
|
||||||
|
|
||||||
// Focus the first item
|
// Focus the first item
|
||||||
target.querySelectorAll('[role^="menuitem"]')[0].focus();
|
var firstItem = target.querySelector('[role^="menuitem"]');
|
||||||
|
if (firstItem) {
|
||||||
|
firstItem.focus();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@ -3990,11 +3995,9 @@ typeof navigator === "object" && (function (global, factory) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If there's a play button, set label
|
// If there's a play button, set label
|
||||||
if (is.nodeList(this.elements.buttons.play)) {
|
Array.from(this.elements.buttons.play || []).forEach(function (button) {
|
||||||
Array.from(this.elements.buttons.play).forEach(function (button) {
|
button.setAttribute('aria-label', label);
|
||||||
button.setAttribute('aria-label', label);
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set iframe title
|
// Set iframe title
|
||||||
// https://github.com/sampotts/plyr/issues/124
|
// https://github.com/sampotts/plyr/issues/124
|
||||||
@ -4074,11 +4077,9 @@ typeof navigator === "object" && (function (global, factory) {
|
|||||||
toggleClass(this.elements.container, this.config.classNames.stopped, this.stopped);
|
toggleClass(this.elements.container, this.config.classNames.stopped, this.stopped);
|
||||||
|
|
||||||
// Set state
|
// Set state
|
||||||
if (is.nodeList(this.elements.buttons.play)) {
|
Array.from(this.elements.buttons.play || []).forEach(function (target) {
|
||||||
Array.from(this.elements.buttons.play).forEach(function (target) {
|
target.pressed = _this3.playing;
|
||||||
target.pressed = _this3.playing;
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only update controls on non timeupdate events
|
// Only update controls on non timeupdate events
|
||||||
if (is.event(event) && event.type === 'timeupdate') {
|
if (is.event(event) && event.type === 'timeupdate') {
|
||||||
|
2
dist/plyr.js.map
vendored
2
dist/plyr.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.min.js
vendored
2
dist/plyr.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.min.js.map
vendored
2
dist/plyr.min.js.map
vendored
File diff suppressed because one or more lines are too long
7
src/js/controls.js
vendored
7
src/js/controls.js
vendored
@ -661,6 +661,7 @@ const controls = {
|
|||||||
setQualityMenu(options) {
|
setQualityMenu(options) {
|
||||||
// Menu required
|
// Menu required
|
||||||
if (!is.element(this.elements.settings.panels.quality)) {
|
if (!is.element(this.elements.settings.panels.quality)) {
|
||||||
|
console.warn('Not an element');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -673,6 +674,7 @@ const controls = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Toggle the pane and tab
|
// Toggle the pane and tab
|
||||||
|
console.warn(this.options.quality);
|
||||||
const toggle = !is.empty(this.options.quality) && this.options.quality.length > 1;
|
const toggle = !is.empty(this.options.quality) && this.options.quality.length > 1;
|
||||||
controls.toggleMenuButton.call(this, type, toggle);
|
controls.toggleMenuButton.call(this, type, toggle);
|
||||||
|
|
||||||
@ -1073,7 +1075,10 @@ const controls = {
|
|||||||
toggleHidden(target, false);
|
toggleHidden(target, false);
|
||||||
|
|
||||||
// Focus the first item
|
// Focus the first item
|
||||||
target.querySelectorAll('[role^="menuitem"]')[0].focus();
|
const firstItem = target.querySelector('[role^="menuitem"]');
|
||||||
|
if (firstItem) {
|
||||||
|
firstItem.focus();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Build the default HTML
|
// Build the default HTML
|
||||||
|
Loading…
x
Reference in New Issue
Block a user