function toggleCaptions(input) {
            // If there's no full support, or there's no caption toggle
            if (!this.supported.ui || !utils.is.element(this.elements.buttons.captions)) {
                return;
            }

            // If the method is called without parameter, toggle based on current value
            var show = utils.is.boolean(input) ? input : this.elements.container.className.indexOf(this.config.classNames.captions.active) === -1;

            // Nothing to change...
            if (this.captions.active === show) {
                return;
            }

            // Set global
            this.captions.active = show;

            // Toggle state
            utils.toggleState(this.elements.buttons.captions, this.captions.active);

            // Add class hook
            utils.toggleClass(this.elements.container, this.config.classNames.captions.active, this.captions.active);

            // Trigger an event
            utils.dispatchEvent.call(this, this.media, this.captions.active ? 'captionsenabled' : 'captionsdisabled');
        }
/**
         * Toggle captions
         * @param {boolean} input - Whether to enable captions
         */
Toggle captions
@param {boolean} input - Whether to enable captions
Toggle captions @param { boolean } input - Whether to enable captions
function toggleCaptions(input) {
            if (!this.supported.ui || !utils.is.element(this.elements.buttons.captions)) {
                return;
            }
            var show = utils.is.boolean(input) ? input : this.elements.container.className.indexOf(this.config.classNames.captions.active) === -1;
            if (this.captions.active === show) {
                return;
            }
            this.captions.active = show;
            utils.toggleState(this.elements.buttons.captions, this.captions.active);
            utils.toggleClass(this.elements.container, this.config.classNames.captions.active, this.captions.active);
            utils.dispatchEvent.call(this, this.media, this.captions.active ? 'captionsenabled' : 'captionsdisabled');
        }
function toggleCaptions ( input ) { if ( ! this . supported . ui || ! utils . is . element ( this . elements . buttons . captions ) ) { return ; } var show = utils . is . boolean ( input ) ? input : this . elements . container . className . indexOf ( this . config . classNames . captions . active ) === - 1 ; if ( this . captions . active === show ) { return ; } this . captions . active = show ; utils . toggleState ( this . elements . buttons . captions , this . captions . active ) ; utils . toggleClass ( this . elements . container , this . config . classNames . captions . active , this . captions . active ) ; utils . dispatchEvent . call ( this , this . media , this . captions . active ? 'captionsenabled' : 'captionsdisabled' ) ; }
Toggle captions
 @param {boolean} input - Whether to enable captions
Toggle captions @param { boolean } input - Whether to enable captions
// If there's no full support, or there's no caption toggle // If the method is called without parameter, toggle based on current value // Nothing to change... // Set global // Toggle state // Add class hook // Trigger an event