Updated data attributes to data-plyr namespace. Speed menu fixes

This commit is contained in:
Sam Potts
2017-11-23 12:57:43 +11:00
parent 7382553a78
commit de6f0f1b77
20 changed files with 365 additions and 429 deletions

View File

@ -43,20 +43,13 @@ const captions = {
// Inject the container
if (!utils.is.htmlElement(this.elements.captions)) {
this.elements.captions = utils.createElement(
'div',
utils.getAttributesFromSelector(this.config.selectors.captions)
);
this.elements.captions = utils.createElement('div', utils.getAttributesFromSelector(this.config.selectors.captions));
utils.insertAfter(this.elements.captions, this.elements.wrapper);
}
// Set the class hook
utils.toggleClass(
this.elements.container,
this.config.classNames.captions.enabled,
!utils.is.empty(captions.getTracks.call(this))
);
utils.toggleClass(this.elements.container, this.config.classNames.captions.enabled, !utils.is.empty(captions.getTracks.call(this)));
// If no caption file exists, hide container for caption text
if (utils.is.empty(captions.getTracks.call(this))) {