-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Youtube-player: add support to toggle FullScreen #30485
Comments
Adds a method on the `YouTubePlayer` to put the element in fullscreen mode. This is a bit more involved than just calling `requestFullScreen`, because we also need to change the styles to ensure that the placeholder and the `iframe` cover the whole screen. Fixes angular#30485.
Adds a method on the `YouTubePlayer` to put the element in fullscreen mode. This is a bit more involved than just calling `requestFullScreen`, because we also need to change the styles to ensure that the placeholder and the `iframe` cover the whole screen. Fixes angular#30485.
@crisbeto wow, that is quick. |
Will this be available soon version 19.1.5? |
@crisbeto I wanted to share this: ![]() ![]() The iframe with the youtube video doesn't seem to resize. Is that something I can control? |
okay, I was able to reset the size of the youtube player on resize, it goes to window.outerWidth and window.outerHeight, instead of what it was non fullscreen mode. **update: got it to work, using innerheight for height is better and I get it to fullscreen, |
It'll be available in 19.2.0. As for the resizing, I was comparing it to how it looks when it becomes fullscreen through the button inside the iframe and it looked identical. Here's the demo: https://ng-comp-devapp.web.app/youtube-player |
@crisbeto Yes, it is the same. Thanks for the quick pickup!! Much appreciated. |
Feature Description
I am creating my own controls to Start (playVideo) and Pause (pauseVideo( a video and I would also like to be able to add a fullscreen button outside of the youtube-player component.
There seems to be no function available for it and I also can't
requestFullscreen
on the iframe.Is there away, maybe via postMessage to tell the iframe to go trigger fullscreen?
If not, can this be provided?
The Youtube API doesn't mention anything. So I guess it is not possible.
Use Case
Toggle fullscreen when youtube controls are disabled, outside of the youtube component.
We want to use it on a Smart TV and using the D-pad arrows on the remote to go to the fullscreen icon is not very convenient. Being able to programatically go fullscreen should not be anymore insecure as allowing to Play or Pause, I think.
The text was updated successfully, but these errors were encountered: