videojs / videojs-contrib-ads

A Tool for Building Video.js Ad Plugins
http://videojs.github.io/videojs-contrib-ads/
Other
382 stars 257 forks source link

Controls added to control bar via plugins are not hidden while ad is playing #240

Open mjneil opened 7 years ago

mjneil commented 7 years ago

If a plugin adds a new control to the control bar, when the player is playing an ad, that control is not hidden like the other controls that are not specific to playback of ad (e.g. captions, audio tracks).

I think it would be a good idea to change the css rules to act like a whitelist showing specific controls instead of a blacklist hiding specific controls. This way plugin developers don't have to worry about adding special css rules if ads are present.

e.g.

.vjs-ad-playing .vjs-control {
  display: none;
}
.vjs-ad-playing .vjs-control.vjs-play-control {
  display: block;
}
...

Thoughts?

incompl commented 7 years ago

Great idea