HTML5 video full screen on mobile browsers (android)

16,672

You can make a popup at 100% width/height with a close button on absolute on it playing your HTML5 video.

Old, simple and dirty trick... But works

Share:
16,672
matewka
Author by

matewka

Updated on June 15, 2022

Comments

  • matewka
    matewka almost 2 years

    After a huge research I didn't find any answer to my question yet. I wanted to achieve my goal with FullScreenAPI but it is not supported in any mobile browser (except Firefox 19 and Blackberry browser - but I need a cross-browser solution). Here's the source. I also tested FullScreenAPI on native android browser and mobile Chrome with appropriately prefixed fullscreen functions. Each function was of type undefined.

    Another approach was the rtsp protocol which is usually handled by an outer player. Here is the guy who assumes that m.youtube.com uses that solution - I think it is not true (maybe the answer is outdated). Youtube uses native video's fullscreen. On mobile Chrome when you tap the play button, the movie instantly goes fullscreen.

    Although, every source I googled tells me that native fullscreen is not possible on android browsers, still HTML5 video element with its native controls gives us a fullscreen button which works perfectly out there.

    Since I don't want the native controls, can anyone share any ingenious solution to How to trigger HTML5 video fullscreen button'sevent?

  • matewka
    matewka about 11 years
    Yeah, I forgot to share this possibility in the question. Unfortunately it is not a solution for me :( I need to trigger that very fullscreen from the native button (or, if it's not possible, I need to be 100% sure).
  • Antony D'Andrea
    Antony D'Andrea over 7 years
    This makes the webpage full screen, not just the element or video.