Skip to content

Commit

Permalink
Update options
Browse files Browse the repository at this point in the history
  • Loading branch information
norlin committed May 10, 2016
1 parent 5e56d9f commit 87754a5
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/videojs-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down Expand Up @@ -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){
Expand Down

0 comments on commit 87754a5

Please sign in to comment.