Starting a video from web page on iPhone

Posted on 2014-08-29
Last Modified: 2014-08-30
I am currenly using JWPlayer as my HTML5 video player, but this issue applies in general to iOS.
You can't autostart/autoplay a video from a web page on iPhone because iOS disables the feature.
You also can't simulate a button click in javascript to start the video on page load.
The only way to get a video on a web page to start playing is to touch a link or button on the screen.
I am trying to figure out how YouTube gets their videos to start.

Example -
(On iPhone 5) -
You go to and it shows you a bunch of images of videos.
When you touch one of the images it then appears to reload the page with a query string - e.g.

And as soon as the page reloads, the video starts to play.

Does anyone know how they are doing this?


Question by:kevinvw1
    LVL 25

    Accepted Solution

    youtube on mobile is a javascript app. so that is not a page reload. you have to click on a video to have it play. notice that if you go directly to the second link you provided, the video does not play automatically.

    you cant do it, and you shouldn't want to. ask anybody if they appreciate when video content starts playing automatically in their browser. if someone wants to see your video, they will click the play button

    Author Comment

    I don't want the video to completely autostart.  I want to do what YouTube is doing.  

    But I think I understand what you are saying.

    I didn't realize that you can manipulate the URL without a page reload.

    I will investigate that route.


    LVL 25

    Expert Comment

    by:Kyle Hamilton
    yes. you can use push states. if you look into any of the js frameworks, like backbone or angular, that's how they do it.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
    This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
    In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
    In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now