1

So I hide my embed youtube video controls:

var player = new YT.Player('player', {
  playerVars: {
    controls: 0,
    showinfo: 0,
    modestbranding: 1,
    autohide: 1,
    iv_load_policy: 3,
    rel: 0
  }
});

But I still can open make the video full screen by double-clicking the video, which is fine.

Actually, I'd also like to have a custom button to make the player full screen.

I could actually make the iframe#player full screen, or use one of these strategies but I'd much rather have a native way to do it, which means actually calling the method that is called on a double click on the video.

Any chance I can do that? The doc doesn't seem to talk about it explicitly, and inspecting the player JS var did not give me much success either.

Community
  • 1
  • 1
Augustin Riedinger
  • 20,909
  • 29
  • 133
  • 206

0 Answers0