Author Topic: How to embed YouTube vids  (Read 2015 times)

admin

  • Administrator
  • Newbie
  • *****
  • Posts: 9
  • Drinks leaded fuel for breakfast
  • Location: On the road
    • www.w116.org
How to embed YouTube vids
« on: 17 November 2011, 05:19 PM »
Take a video
Code: [Select]

http://www.youtube.com/watch?v=g75P9F7Qpbo


Replace /watch?v= with /v/ like this

Code: [Select]

http://www.youtube.com/v/g75P9F7Qpbo


Add flash tags

Code: [Select]

[flash=640,480]http://www.youtube.com/v/g75P9F7Qpbo[/flash]


Enjoy :)

http://www.youtube.com/v/g75P9F7Qpbo

Nutz

  • Vintage
  • ***
  • Posts: 587
  • Location: Hawaii (Maui)
    • W123 Gassers
Re: How to embed YouTube vids
« Reply #1 on: 17 November 2011, 07:32 PM »
So version 2 SMF won't just allow you to merely post the youtube link like SMF 1?

oscar

  • W116 Addict
  • ****
  • Posts: 4,043
  • Location: Riverina, NSW, AUSTRALIA
Re: How to embed YouTube vids
« Reply #2 on: 18 November 2011, 11:27 PM »
Code: [Select]
[flash=640,480]http://www.youtube.com/v/=g75P9F7Qpbo[/flash]
I just tried same thing with a few vids then the example after seaching "w116" on YT.  I come up with the same code, but got a big white square and no video when I posted.  What am I doing wrong, the code looks exactly the same?
« Last Edit: 18 November 2011, 11:30 PM by oscar »
1973 350SE, my first & fave

gavin116

  • Classic
  • **
  • Posts: 435
  • 1979 450SE
  • Location: London, UK
Re: How to embed YouTube vids
« Reply #3 on: 18 November 2011, 11:52 PM »
Hi Oscar,

I had similar problems using your method, and had to click a few more buttons in youtube to get "use old embedded code".
I had to use :

 <object width="560" height="315"><param name="movie" value="http://www.youtube.com/v/HsbLN5PxE64?version=3&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/HsbLN5PxE64?version=3&amp;hl=en_US" type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object> 

which I then cut down to: http://www.youtube.com/v/HsbLN5PxE64?version=3&amp;hl=en_US" type="application/x-shockwave-flash" instead of just using the youtube link http://www.youtube.com/watch?v=HsbLN5PxE64.  I then inserted the final code into the flash command.

The admin's way looks to be a little easier, but I think that they omitted the part about the screen size, i.e. flash = xxx,yyy because that will not work for all videos.

The code that you posted appears to have an extra "=" after the /v/=g75....

Try that and see if it helps.

Regards

Gavin

P.S. I got your example to work using the editors method, but it will not work for my youtube movie, I just get a blank screen. :-[

http://www.youtube.com/v/g75P9F7Qpbo
« Last Edit: 19 November 2011, 12:08 AM by gavin116 »

oscar

  • W116 Addict
  • ****
  • Posts: 4,043
  • Location: Riverina, NSW, AUSTRALIA
Re: How to embed YouTube vids
« Reply #4 on: 19 November 2011, 12:39 AM »
Thanks Gavin, you're absolutely right.  Just tried it without the "=" and it worked.

I must have forgotten to mention in my other post about selecting "use old embed code"  I agree it was cumbersome but I suppose I got used to it and it was the only way I could get it to work.  Until admin's new way of course which is easier.  It just makes a post much more palatable being able to view embedded video without having to open another window or tab via a link.

I just tried one of my vids, leaving the window at 200,200 and it worked yet previously wouldn't. Again I think I must have neglected to omit the "=" I even left the "feature=related" bit of the code that you sometimes get added on and it worked yet I thought that might have been a problem, but apparently not.  For you rvideo, no idea what the problem could be but on screen size, for other vids in the past I put the screen size that the old embed code recommended and that seemed to make the videos work flawlessly.

http://www.youtube.com/v/VGZ7Ct0547Y&feature=related
1973 350SE, my first & fave