website youtube for iPad/iPhone

Discussion in 'iOS Programming' started by Benikens, Jun 28, 2011.

  1. Benikens macrumors newbie

    Joined:
    Jun 28, 2011
    #1
    My work website has an embedded youtube clip on it, tho when viewed from an iPhone or iPad it appears as a blank area. The web master had it inside a iframe and was supposed to just show a picture if the browser was incapable of playing the video. How do i achieve this for the iOS environment? or even better how is it websites link to the youtube app on an iPhone to play video's normally played in browser?

    Been trying to find answers on google, but everytime you mention youtube in a search you end up finding youtube itself and not programming information.
     
  2. nickculbertson macrumors regular

    nickculbertson

    Joined:
    Nov 19, 2010
    Location:
    Nashville, TN
    #2
    The problem probably has something to do with how the video is embedded. On my blogspot page (shameless ;) ) I have my video embedded like so..

    Code:
    <object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://2.gvt0.com/vi/Zzt_1F2B_Io/0.jpg" height="266" width="320"><param name="movie" value="http://www.youtube.com/v/Zzt_1F2B_Io&fs=1&source=uds" />
    <param name="bgcolor" value="#FFFFFF" />
    <embed width="320" height="266"  src="http://www.youtube.com/v/Zzt_1F2B_Io&fs=1&source=uds" type="application/x-shockwave-flash"></embed></object></div>
    These videos play and appear fine from inside my apps.
     
  3. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #3
    Don't forget, that iOS has terrible handling of iFrames (noticed on first hand..)
     

Share This Page