From 87754a540e0fee8dbfd6268e13f85c75253e2ac9 Mon Sep 17 00:00:00 2001 From: norlin Date: Tue, 10 May 2016 15:20:43 +0300 Subject: [PATCH] Update options --- src/videojs-settings.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/videojs-settings.js b/src/videojs-settings.js index 8522bd6..d696aa9 100644 --- a/src/videojs-settings.js +++ b/src/videojs-settings.js @@ -109,15 +109,12 @@ vjs.registerComponent('SettingsButton', vjs.extend(MenuButton, { var _this = this; var opt = this.options_; var menu = MenuButton.prototype.createMenu.call(this); - if (opt.show_settings_popup_on_click) - { - menu.addClass('vjs-menu-popup-on-click'); - // videojs removes the locking state on menu item click that causes - // settings button to hide without updating buttonPressed state - menu.children().forEach(function(component){ - component.on('click', function(){ _this.handleClick(); }); - }); - } + menu.addClass('vjs-menu-popup-on-click'); + // videojs removes the locking state on menu item click that causes + // settings button to hide without updating buttonPressed state + menu.children().forEach(function(component){ + component.on('click', function(){ _this.handleClick(); }); + }); return menu; }, handleClick: function(){ @@ -400,6 +397,8 @@ var QualityButton = vjs.getComponent('QualityButton'); vjs.plugin('settings', function(opt){ var video = this; + if (opt===undefined||opt===true) + opt = {info: true, report: true, quality: true}; opt = vjs.mergeOptions({}, opt); video.on('ready', function(){ function local_storage_set(key, value){