Skip to content

Commit

Permalink
Merge pull request #289 from b202020/fixVisibilityIssue
Browse files Browse the repository at this point in the history
Fix window.getComputedStyle call on null
  • Loading branch information
golikov committed Nov 19, 2018
2 parents 95a439f + 260090b commit 8dfc753
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fluidplayer.js
Expand Up @@ -3930,7 +3930,13 @@ var fluidPlayerClass = {
},

isControlBarVisible: function() {
var controlBar = document.getElementById(this.videoPlayerId + '_fluid_controls_container');
var player = this;

if (player.hasControlBar() === false) {
return false;
}

var controlBar = document.getElementById(player.videoPlayerId + '_fluid_controls_container');
var style = window.getComputedStyle(controlBar, null);
return !(style.opacity == 0 || style.visibility == 'hidden');
},
Expand Down

0 comments on commit 8dfc753

Please sign in to comment.