diff --git a/lib/videojs-resolution-switcher.js b/lib/videojs-resolution-switcher.js index 187c654..4e54581 100644 --- a/lib/videojs-resolution-switcher.js +++ b/lib/videojs-resolution-switcher.js @@ -53,6 +53,8 @@ if (options.initialySelected) { this.showAsLabel(); this.selected(true); + + this.addClass('vjs-selected'); } }, showAsLabel: function() { @@ -67,6 +69,10 @@ var currentTime = this.player_.currentTime(); var isPaused = this.player_.paused(); this.showAsLabel(); + + // add .current class + this.addClass('vjs-selected'); + // Hide bigPlayButton if(!isPaused){ this.player_.bigPlayButton.hide(); @@ -123,6 +129,7 @@ var onClickUnselectOthers = function(clickedItem) { menuItems.map(function(item) { item.selected(item === clickedItem); + item.removeClass('vjs-selected'); }); };