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 4105852
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:18:04+00:00 2026-05-20T21:18:04+00:00

On the iPhone and iPod, if a YouTube video is embedded in a web

  • 0

On the iPhone and iPod, if a YouTube video is embedded in a web page, the user can touch the video and the video will start playing—the iOS media player slides in and the video plays full screen in landscape orientation. Once the video has finished playing, the iOS media player slides back out, revealing the web page where the video was embedded.

Using the HTML5 <video> tag, the user can touch the video and the video will “zoom” to full screen and start playing in whatever the current device orientation is. Once the video has finished playing, the user must tap once to bring up the player controls, and then tap “Done” in order to return to the web page.

Unfortunately, uploading my videos to YouTube is not an option for this application, and I haven’t found an HTML5 video player that returns to the website after the video is finished playing. I would prefer either that the video player exhibits the same behavior as the YouTube embedded videos, or that the video plays inline. Forcing inline video is possible in a customized UIWebView, but unfortunately that is not an option (as this is meant to be a web app, not a native app). Additionally, the <video> property webkit-playsinline does not work.

Are there any HTML5 video players that can replicate the embedded YouTube video behavior? Am I missing any obvious Javascript workarounds? Is there a method to tell the window that the video is finished playing without user interaction?

EDIT:

Thanks to Jan, this problem is solved. Working code follows, along with a list of mistakes/notes.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>scratchpad</title>
</head>
<body>
<video id="video">
    <source src="movie.mp4" type="video/mp4" />
</video>
<script type="text/javascript">
document.getElementById('video').addEventListener('ended',function(){document.getElementById('video').webkitExitFullScreen();},false);
</script>
</body>
</html>

Mistakes I made:
1. Forgot to add an ID in the <video> tag.
2. Testing for webkitSupportsFullscreen—I couldn’t ever get that property to test as “true.” A comment in code in this forum post says,

// note: .webkitSupportsFullscreen is false while the video is loading

but I was unable to create a condition in which it returned true.
3. Completely missed this stackoverflow post.

  • 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-20T21:18:04+00:00Added an answer on May 20, 2026 at 9:18 pm

    Hm, can’t try that myself…but sure you’ve seen this?

    http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLVideoElementClassReference/HTMLVideoElement/HTMLVideoElement.html#//apple_ref/doc/uid/TP40009356

    So, “webkitEnterFullScreen()” might be your friend (although the doc says its read-only):

    http://nathanbuskirk.com/?p=1

    Inline video is not possible on any iOS device beside iPad (so far).

    Anyway, you may detect the end of a video in Javascript by using an Event Listener:

    document.getElementById('video').addEventListener('ended',videoEndListener,false);
    

    Cheers,

    Jan

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

Sidebar

Related Questions

On the iPhone/iPod touch, settings could be kept in the Settings.app. Can you do
We'd like to 'lock-down' an iPhone/iPod/iPad so that the user can only run one
I'm trying to use the Skype SMS URI from an iOS (iPhone/iPod Touch) app,
I'm making a web-app for iPhone/iPod touch. And need to load in a external
Is iPhone supports RTMP (Real Time Media Player) Video format to play into iphone/ipod
Is it possible (on iPhone/iPod Touch) for a file written like this: if (FILE*
Is there any way to access the iPhone/iPod touch settings programatically ? Thanks. Biranchi
I want to call presentmodalviewcontroller when the iPhone / iPod Touch is rotated to
I've searched around a bit in the small amount of iPhone/iPod Touch development information
Can anybody tell me how to search for available iPhone/iPod devices on a network

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.