Merge branch 'master' of github.com:sampotts/plyr

This commit is contained in:
Sam Potts 2018-04-11 23:44:44 +10:00
commit ab393651ec
5 changed files with 5 additions and 3 deletions

View File

@ -59,6 +59,7 @@ i18n: {
captions: 'Captions',
settings: 'Settings',
speed: 'Speed',
normal: 'Normal',
quality: 'Quality',
loop: 'Loop',
start: 'Start',

2
src/js/controls.js vendored
View File

@ -511,7 +511,7 @@ const controls = {
getLabel(setting, value) {
switch (setting) {
case 'speed':
return value === 1 ? 'Normal' : `${value}×`;
return value === 1 ? i18n.get('normal', this.config) : `${value}×`;
case 'quality':
if (utils.is.number(value)) {

View File

@ -177,6 +177,7 @@ const defaults = {
captions: 'Captions',
settings: 'Settings',
speed: 'Speed',
normal: 'Normal',
quality: 'Quality',
loop: 'Loop',
start: 'Start',

View File

@ -845,7 +845,7 @@ class Plyr {
}
// If the method is called without parameter, toggle based on current value
const show = utils.is.boolean(input) ? input : this.elements.container.className.indexOf(this.config.classNames.captions.active) === -1;
const show = utils.is.boolean(input) ? input : !this.elements.container.classList.contains(this.config.classNames.captions.active);
// Nothing to change...
if (this.captions.active === show) {

View File

@ -35,7 +35,7 @@
right: -3px;
text-align: left;
white-space: nowrap;
z-index: 1;
z-index: 3;
> div {
overflow: hidden;