Fix #1003: Formatted captions issue

This commit is contained in:
Albin Larsson 2018-06-08 13:31:29 +02:00
parent b12eeb0eb7
commit a80b31bf98
3 changed files with 3 additions and 2 deletions

View File

@ -222,7 +222,7 @@ const captions = {
if (changed) { if (changed) {
// Empty the container and create a new child element // Empty the container and create a new child element
utils.emptyElement(this.elements.captions); utils.emptyElement(this.elements.captions);
const caption = utils.createElement('span'); const caption = utils.createElement('span', utils.getAttributesFromSelector(this.config.selectors.caption));
caption.innerHTML = content; caption.innerHTML = content;
this.elements.captions.appendChild(caption); this.elements.captions.appendChild(caption);

View File

@ -328,6 +328,7 @@ const defaults = {
}, },
progress: '.plyr__progress', progress: '.plyr__progress',
captions: '.plyr__captions', captions: '.plyr__captions',
caption: '.plyr__caption',
menu: { menu: {
quality: '.js-plyr__menu__list--quality', quality: '.js-plyr__menu__list--quality',
}, },

View File

@ -21,7 +21,7 @@
transition: transform 0.4s ease-in-out; transition: transform 0.4s ease-in-out;
width: 100%; width: 100%;
span { .plyr__caption {
background: $plyr-captions-bg; background: $plyr-captions-bg;
border-radius: 2px; border-radius: 2px;
box-decoration-break: clone; box-decoration-break: clone;