Tab focus

This commit is contained in:
Sam Potts
2016-01-14 01:19:48 +11:00
parent 38f554b480
commit e05538e480
2 changed files with 11 additions and 2 deletions

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -2130,7 +2130,16 @@
checkFocus();
}
});
_on(document.body, 'click', checkFocus);
_on(document.body, 'click', function() {
_toggleClass(_getElement('.' + config.classes.tabFocus), config.classes.tabFocus, false);
});
for (var button in plyr.buttons) {
var element = plyr.buttons[button];
_on(element, 'blur', function() {
_toggleClass(element, 'tab-focus', false);
});
}
// Play
_on(plyr.buttons.play, 'click', function() { _togglePlay(true); });