function findElements() {
        try {
            this.elements.controls = utils.getElement.call(this, this.config.selectors.controls.wrapper);

            // Buttons
            this.elements.buttons = {
                play: utils.getElements.call(this, this.config.selectors.buttons.play),
                pause: utils.getElement.call(this, this.config.selectors.buttons.pause),
                restart: utils.getElement.call(this, this.config.selectors.buttons.restart),
                rewind: utils.getElement.call(this, this.config.selectors.buttons.rewind),
                fastForward: utils.getElement.call(this, this.config.selectors.buttons.fastForward),
                mute: utils.getElement.call(this, this.config.selectors.buttons.mute),
                pip: utils.getElement.call(this, this.config.selectors.buttons.pip),
                airplay: utils.getElement.call(this, this.config.selectors.buttons.airplay),
                settings: utils.getElement.call(this, this.config.selectors.buttons.settings),
                captions: utils.getElement.call(this, this.config.selectors.buttons.captions),
                fullscreen: utils.getElement.call(this, this.config.selectors.buttons.fullscreen)
            };

            // Progress
            this.elements.progress = utils.getElement.call(this, this.config.selectors.progress);

            // Inputs
            this.elements.inputs = {
                seek: utils.getElement.call(this, this.config.selectors.inputs.seek),
                volume: utils.getElement.call(this, this.config.selectors.inputs.volume)
            };

            // Display
            this.elements.display = {
                buffer: utils.getElement.call(this, this.config.selectors.display.buffer),
                duration: utils.getElement.call(this, this.config.selectors.display.duration),
                currentTime: utils.getElement.call(this, this.config.selectors.display.currentTime)
            };

            // Seek tooltip
            if (utils.is.element(this.elements.progress)) {
                this.elements.display.seekTooltip = this.elements.progress.querySelector('.' + this.config.classNames.tooltip);
            }

            return true;
        } catch (error) {
            // Log it
            this.debug.warn('It looks like there is a problem with your custom controls HTML', error);

            // Restore native video controls
            this.toggleNativeControls(true);

            return false;
        }
    }
// TODO: Allow settings menus with custom controls
Allow settings menus with custom controls
Allow settings menus with custom controls
function findElements() {
        try {
            this.elements.controls = utils.getElement.call(this, this.config.selectors.controls.wrapper);
            this.elements.buttons = {
                play: utils.getElements.call(this, this.config.selectors.buttons.play),
                pause: utils.getElement.call(this, this.config.selectors.buttons.pause),
                restart: utils.getElement.call(this, this.config.selectors.buttons.restart),
                rewind: utils.getElement.call(this, this.config.selectors.buttons.rewind),
                fastForward: utils.getElement.call(this, this.config.selectors.buttons.fastForward),
                mute: utils.getElement.call(this, this.config.selectors.buttons.mute),
                pip: utils.getElement.call(this, this.config.selectors.buttons.pip),
                airplay: utils.getElement.call(this, this.config.selectors.buttons.airplay),
                settings: utils.getElement.call(this, this.config.selectors.buttons.settings),
                captions: utils.getElement.call(this, this.config.selectors.buttons.captions),
                fullscreen: utils.getElement.call(this, this.config.selectors.buttons.fullscreen)
            };
            this.elements.progress = utils.getElement.call(this, this.config.selectors.progress);
            this.elements.inputs = {
                seek: utils.getElement.call(this, this.config.selectors.inputs.seek),
                volume: utils.getElement.call(this, this.config.selectors.inputs.volume)
            };
            this.elements.display = {
                buffer: utils.getElement.call(this, this.config.selectors.display.buffer),
                duration: utils.getElement.call(this, this.config.selectors.display.duration),
                currentTime: utils.getElement.call(this, this.config.selectors.display.currentTime)
            };
            if (utils.is.element(this.elements.progress)) {
                this.elements.display.seekTooltip = this.elements.progress.querySelector('.' + this.config.classNames.tooltip);
            }
            return true;
        } catch (error) {
            this.debug.warn('It looks like there is a problem with your custom controls HTML', error);
            this.toggleNativeControls(true);
            return false;
        }
    }
function findElements ( ) { try { this . elements . controls = utils . getElement . call ( this , this . config . selectors . controls . wrapper ) ; this . elements . buttons = { play : utils . getElements . call ( this , this . config . selectors . buttons . play ) , pause : utils . getElement . call ( this , this . config . selectors . buttons . pause ) , restart : utils . getElement . call ( this , this . config . selectors . buttons . restart ) , rewind : utils . getElement . call ( this , this . config . selectors . buttons . rewind ) , fastForward : utils . getElement . call ( this , this . config . selectors . buttons . fastForward ) , mute : utils . getElement . call ( this , this . config . selectors . buttons . mute ) , pip : utils . getElement . call ( this , this . config . selectors . buttons . pip ) , airplay : utils . getElement . call ( this , this . config . selectors . buttons . airplay ) , settings : utils . getElement . call ( this , this . config . selectors . buttons . settings ) , captions : utils . getElement . call ( this , this . config . selectors . buttons . captions ) , fullscreen : utils . getElement . call ( this , this . config . selectors . buttons . fullscreen ) } ; this . elements . progress = utils . getElement . call ( this , this . config . selectors . progress ) ; this . elements . inputs = { seek : utils . getElement . call ( this , this . config . selectors . inputs . seek ) , volume : utils . getElement . call ( this , this . config . selectors . inputs . volume ) } ; this . elements . display = { buffer : utils . getElement . call ( this , this . config . selectors . display . buffer ) , duration : utils . getElement . call ( this , this . config . selectors . display . duration ) , currentTime : utils . getElement . call ( this , this . config . selectors . display . currentTime ) } ; if ( utils . is . element ( this . elements . progress ) ) { this . elements . display . seekTooltip = this . elements . progress . querySelector ( '.' + this . config . classNames . tooltip ) ; } return true ; } catch ( error ) { this . debug . warn ( 'It looks like there is a problem with your custom controls HTML' , error ) ; this . toggleNativeControls ( true ) ; return false ; } }
TODO: Allow settings menus with custom controls
TODO : Allow settings menus with custom controls
// Buttons // Progress // Inputs // Display // Seek tooltip // Log it // Restore native video controls