Hello,

I'd like to embed a YouTube Video using YouTube's new iFrame code so it can be seen on the iPhone. Here is the code YouTube gives:

<iframe class="youtube-player" type="text/html" width="560" height="340" src="http://www.youtube.com/embed/Fk0_wl5-tWM" frameborder="0"></iframe>

Here is a link to the page using this code:

http://hodentalcompany.com/test/pages/syringe.html

But, I would also like to use Shadowbox, which is like Lightbox:

http://www.shadowbox-js.com/

I cannot figure out how to write the HTML code to get Shadowbox to work. Here is a link to a page that uses Shadowbox, but also the old YourTube type embedding:

http://hodentalcompany.com/test/pages/syringe-Copy.html

Here is the HTML from the second page:

    <a rel="shadowbox;width=640;height=385;player=swf" href="http://www.youtube.com/v/Fk0_wl5-tWM?fs=1&amp;hl=en_US&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999">
<img src="../imagesBob/bfcSyringe/BFC_MoviePlaceholder.jpg" width="320" height="192" alt="Instructional Video">
</a>

I would rather use the new iFrame code.

Can anyone figure out how to use the iFrame code given above, instead of this older YouTube code?

Thank you!!!

2 answers

0
points

replacing href="http://www.youtube.com/v/Fk0_wl5-tWM?fs=1&hl=en_US&rel=0&color1=0x3a3a3a&color2=0x99999"

with "http://www.youtube.com/embed/Fk0_wl5-tWMshould do the trick."

I don't see why it would not as the lighbox will be now loading in the source of the iframe. I am not sure what the player=swf parameter is doing in the rel but I would remove that as iPhone will not support swf files.

Answered over 8 years ago by Jeffrey Nolte
0
points

Yes, that would make the code more similar to the iFrame code given above... I can try that; but, I was wondering how to add the Shadowbox code the the iFame code. Here is the iFrame code again:

<iframe class="youtube-player" type="text/html" width="560" height="340" src="http://www.youtube.com/embed/Fk0_wl5-tWM" frameborder="0"></iframe>

Do I just have to add a

rel="shadowbox;width=640;height=385

to the iFrame code to make this work?

Answered over 8 years ago by Bob Faulkner
  • It is most certainly worth a shot. If not prettyPhoto can definitely work with dynamic loaded content. Jeffrey Nolte over 8 years ago