Fullscreen HTML5 Video in Safari via JavaScript

In Safari 5 HTML5 videos played in the <video> tag can now be made fullscreen, if you’re using the default controls then a button is available, but if you’re overriding them with a custom control you can use:


This needs to be called on the video tag element, for example, to fullscreen the first video tag on the page use:


One thought on “Fullscreen HTML5 Video in Safari via JavaScript

  1. Hi I’m trying to apply the code to my .html page but it seems that i’m missing something.

    I hope you can help me


Comments are closed.