Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fullscreen button will be disabled if fullscreen is unavailable #5296

Merged
merged 1 commit into from
Jul 5, 2018

Conversation

DoomTay
Copy link
Contributor

@DoomTay DoomTay commented Jul 3, 2018

Description

In the event that fullscreen is unavailable, such as when the player is in an iframe that does not have the allowfullscreen attribute, the fullscreen button will be disabled. This fixes #5290

Specific Changes proposed

fullscreen-toggle.js will check if fullscreen is enabled, and if not, set the button to "disabled"

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, forgot about the disable() helper we had. Even simpler than I imagined!

@gkatsev gkatsev added the needs: LGTM Needs one or more additional approvals label Jul 4, 2018
@misteroneill misteroneill added confirmed and removed needs: LGTM Needs one or more additional approvals labels Jul 5, 2018
@gkatsev gkatsev merged commit 444b271 into videojs:master Jul 5, 2018
@DoomTay DoomTay deleted the fullscreen-disable branch July 5, 2018 22:11
@wenganxiang
Copy link

How to disable a button? I try to add an 'disabled' attribute to any button on control bar, it does not work. On the contrary, it will cause the button not work normally, even I set 'disabled=false'. I use videojs 7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fullscreen button should be removed or greyed out when fullscreen is unavailable
5 participants