{"size": 1230, "ext": "js", "max_stars_repo_path": "app/bower_components/jw-player/src/js/view/components/volumetooltip.js", "max_stars_repo_name": "datphan/moviecrab", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/bower_components/jw-player/src/js/view/components/volumetooltip.js", "max_issues_repo_name": "datphan/moviecrab", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/bower_components/jw-player/src/js/view/components/volumetooltip.js", "max_forks_repo_name": "datphan/moviecrab", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.5384615385, "max_line_length": 89, "alphanum_fraction": 0.5552845528}
define([
    'view/components/tooltip',
    'view/components/slider',
    'utils/ui',
    'utils/helpers'
], function(Tooltip, Slider, UI, utils) {
    var VolumeTooltip = Tooltip.extend({
        'constructor' : function(_model, name, ariaText) {
            this._model = _model;

            // Prevent Volume tooltip button from being aria-hidden="true"
            Tooltip.call(this, name, ariaText, true);

            this.volumeSlider = new Slider('jw-slider-volume jw-volume-tip', 'vertical');
            this.addContent(this.volumeSlider.element());

            this.volumeSlider.on('update', function (evt) {
                this.trigger('update', evt);
            }, this);

            utils.removeClass(this.el, 'jw-hidden');

            new UI(this.el, {'useHover': true, 'directSelect': true})
                .on('click', this.toggleValue, this)
                .on('tap', this.toggleOpenState, this)
                .on('over', this.openTooltip, this)
                .on('out', this.closeTooltip, this);

            this._model.on('change:volume', this.onVolume, this);
        },
        toggleValue : function(){
            this.trigger('toggleValue');
        }
    });

    return VolumeTooltip;
});

