Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7413767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:57:18+00:00 2026-05-29T06:57:18+00:00

The HTML5 <video> tag offers the user a button to toggle on and off

  • 0

The HTML5 <video> tag offers the user a button to toggle on and off the fullscreen mode on Safari for mobile devices (iOS).

I would like to capture and handle this user action but it doesn’t seem to raise an event when the button is pressed and the player enters the full screen mode.

Here is the link to the Safari API for the HTMLVideoElement class:

https://developer.apple.com/documentation/webkitjs/htmlvideoelement

We can easily find out when the video is paused of played in Javascript, like this:

function onload()
{
  var player = document.getElementsByTagName("video")[0];
  player.addEventListener('play',videoPlayHandler,false);
  player.addEventListener('pause',videoPauseHandler,false);
}

However they don’t seem to have any events for when the video enters the full screen mode.

We can force the video into fullscreen mode in response to user action by calling the webkitEnterFullscreen(), but that doesn’t help me. I need to know when the user taps on the fullscreen button.

Hiding the controls and replacing them by my own custom controls sounds like a really long winded solution.

Another option I can think of is to set a timing event, constantly checking for the webkitDisplayingFullscreen property, but that feels like a bad thing to do in terms of memory management.

Can anyone suggest a better solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:57:19+00:00Added an answer on May 29, 2026 at 6:57 am

    After much faffing around a friend finally pointed me in the right direction.

    The events I was looking for are: webkitbeginfullscreen and webkitendfullscreen

    var player = document.getElementsByTagName("video")[0];
    player.addEventListener('webkitbeginfullscreen', onVideoBeginsFullScreen, false);
    player.addEventListener('webkitendfullscreen', onVideoEndsFullScreen, false);
    

    With that I can safely capture when the user clicks over the fullscreen button on Safari for the iPads. Interestingly the same events don’t seem to work for Safari on the iMac (tested on version 5.1.2).

    Thanks Apple for their inconsistency and hours of wasted time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using html5 video tag for my mobile website in Safari browser. The
Is there a way to play a video fullscreen using the HTML5 <video> tag?
Firefox now supports full screen mode on the video html5 tag. ( right click
Coding HTML5 page for use in iPad Mobile Safari that has tag for embedding
I'm embedding a Flash video into an HTML and would like the user to
I see a lot of talk how HTML5 video tag will kill Flash. But
trying to access various properties of my video tag. started looking at the HTML5
Despite all the hype, in reality the HTML5 video tag has a bit of
I'm using html5 video tag to play a video in dnn.Here .mov videos only
I am using the html5 video tag and was wondering if you could help

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.