Starting a video from web page on iPhone

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 http://m.youtube.com 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.
https://m.youtube.com/watch?v=PkWxVG77xVk

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

Does anyone know how they are doing this?

Thank,

Kevin.
kevinvw1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle HamiltonData ScientistCommented:
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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kevinvw1Author Commented:
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.

Thanks,

Kevin.
0
Kyle HamiltonData ScientistCommented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.