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
Add a fullscreen button to the video controls #24164
Comments
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the If you intend to work on this issue, then add |
@highfive: assign me |
Hey @elaye! Thanks for your interest in working on this issue. It's now assigned to you! |
Hi @ferjm, I'm looking at this issue and I'm trying to play a video in Servo to see what the controls look like at the moment. I test with a simple html file and mp4 video with the following code:
The video displays correctly and starts to play (it stops after a few frames but I assume it's another issue), however I can't see the controls. Is this still valid ? Do I need to do something else to be able to see the controls ? I'm running Servo on MacOS 10.14.6 (Mojave) if that's of any use. |
@elaye thanks for your interest in working on this issue. I'm sorry I forgot to add this to the description. There is no need to set any preference anymore but the media controls are only rendered for block elements at the moment #24015. So adding
Ugh... that shouldn't happen. Could you file another issue for this, please? Thanks. |
Thank you for the additional information @ferjm. It does work with the Is there a property that I can read on the |
You can use the document.exitFullscreen() method.
There is no property specific for the media element, but you can check the document.fullscreenEnabled and document.fullscreenElement properties. |
Ok I've added the exit capability. I've noticed an odd behaviour with it though. When I enter fullscreen mode the window is maximized (at least on macOS) and the video is maximized inside the window. However when I exit the fullscreen mode the video recovers it's original size within the window but the window stays maximized. |
That seems to happen for any fullscreen element. I'll file a separated issue for this. Thanks |
We need to add a new button to the media controls to make the video enter and exit fullscreen mode. The button should only be visible for video elements.
Relevant code:
Fullscreen API: https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API
The text was updated successfully, but these errors were encountered: