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

Youtube-player: add support to toggle FullScreen #30485

Open
mattiLeBlanc opened this issue Feb 13, 2025 · 0 comments · May be fixed by #30491
Open

Youtube-player: add support to toggle FullScreen #30485

mattiLeBlanc opened this issue Feb 13, 2025 · 0 comments · May be fixed by #30491
Assignees
Labels
area: youtube-player feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions

Comments

@mattiLeBlanc
Copy link

mattiLeBlanc commented Feb 13, 2025

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.

@mattiLeBlanc mattiLeBlanc added feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Feb 13, 2025
@crisbeto crisbeto self-assigned this Feb 13, 2025
@crisbeto crisbeto added P4 A relatively minor issue that is not relevant to core functions area: youtube-player and removed needs triage This issue needs to be triaged by the team labels Feb 13, 2025
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 13, 2025
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 added a commit to crisbeto/material2 that referenced this issue Feb 13, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: youtube-player feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants