SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot BTC's Avatar
    Join Date
    Jul 2010
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript API not working on Mobile Devices

    I have integrated the YouTube API only on the index page of the website. It works in all major browsers, including IE 7 and 8. I have tested it on Iphone's, Ipod Touch, Ipad 1st Gen, Ipad 2nd Gen and on various Samsung devices. The actually video from the API does not display on any of these devices (it's just blank space with the CSS styles. The video list "More Videos" does display and appears to function. I cannot figure what is causing this problem?

    Here is the link

    Any help is greatly appreciated!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,199
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    If you just grab the standard YouTube embed code (the iframe code is fine) it works nicely on all devices. They way you are doing it now seems just to serve up the Flash version, which i-Devices don't like.

    To get the gallery-like effect you want, there are quite a few slideshow scripts out there into which you could paste the standard iframe code.

    But perhaps the API discusses this problem and what to do for i-Devices? I'm not sure. I did a bit of Googling, and found discussions on it, but they are a bit over my head.

  3. #3
    SitePoint Zealot BTC's Avatar
    Join Date
    Jul 2010
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ralph,

    Thanks for the help. I have done my research and I believe the Javascript is the problem. I have to support IE7, so I was thinking of using a conditional statement for lte IE 8 to support the Javascript code, then having the iframe as the default. Do you think this is the best route to go?

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,199
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by BTC View Post
    I was thinking of using a conditional statement for lte IE 8 to support the Javascript code, then having the iframe as the default.
    I wouldn't think you'd need both, but maybe I don't understand what you are proposing.

  5. #5
    SitePoint Zealot BTC's Avatar
    Join Date
    Jul 2010
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The iframe API is not supported on IE 7. I was thinking that I should use the javascript API for IE 7 & IE 8, while using the iframe for all other browsers?


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •