As you have spotted, iOS replaces the flash youtube player with a
built-in player, which doesn't have the same API.
As far as I can tell that's because Apple didn't ship flash on iOS and
they weren't happy shipping without being able to play YouTube videos,
so they (or they and Google together) built that hack around it.
However, there is a newer youtube api (the iframe api) which *should*
work on iOS - it uses <video> instead of flash, and supports iOS.
<http://code.google.com/apis/youtube/iframe_api_reference.html>
It's still classed as an "experimental feature" though - you can search
on the list archives to find more information about the occasional
issues on iOS when using that API.
For example, the user has to click on the video to start it - and then
you can use the api afterwards. That's due to something Apple have added
to their <video> implementation to prevent web pages using all of a
user's bandwidth streaming video without their permission.
Tim Wintle
On Fri, 2012-01-06 at 23:06 -0800, Linnium wrote:
> Hello,
>
>
> I'm new to the group and I'm having some trouble finding the answers
> I'm looking for.
>
>
> I've been using what I've learned in the YouTube JavaScript API
> documentation to stop and start video playback using text links. I've
> had plenty of success with this, but it doesn't appear to be working
> when testing my code in the iPad. I'm pretty good at figuring things
> out, but since mobile Safari does allow me to look at source code,
> I've not been able to discover how an embedded YouTube player works on
> an iPad. I'm left to assume that either YouTube converts normal embed
> code into HTML5 (video tag) when on mobile Safari or it's somehow
> using the build in YouTube app to play in the browser. I've tried
> using an app to show me the mobile Safari source code, but it only
> displays compile-time code. I need to see it at run-time.
>
>
> I've not found anything on the internet about the
> YouTube JavaScript API and iPad, and the documentation I found does
> not discuss iPad at all. All of the searches I found are related to
> creating apps for the iPad, which I am not interested in doing.
>
>
> So, I'm stumped. I just want to know how I can control the YouTube
> player using JavaScript in mobile Safari. If anyone hear can shed
> some light on this, I would greatly appreciate it.
>
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "YouTube APIs Developer Forum" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/youtube-api-gdata/-/qbafPw0r0lMJ.
> To post to this group, send email to
> youtube-api-gdata@googlegroups.com.
> To unsubscribe from this group, send email to youtube-api-gdata
> +unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/youtube-api-gdata?hl=en.
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment