News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Gryzor

Youtube Embedding - please read!

Started by Gryzor, 11:59, 09 May 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gryzor

Ok, so it seems Youtube is changing their API and embedding in many cases does not/will not work. So I had to find another solution.


Beginning today (erm, actually, yesterday) you can't just paste the video link for it to be auto-embedded as video. Instead, you'll have to use the BBCode button in the button bar above the text field. It's the third-from-last button, the one with -guessed it?- the YouTube logo on it. Or, of course, you could input the BBCode manually.


You can actually do more stuff now:




[youtube]{youtube link}[/youtube]
[youtube width=x height=y]{youtube link}[/youtube]
[yt]{youtube ID}[/yt]
[yt {parameters}]{youtube ID}[/yt]
[yt_user]{username}[/yt_user]
[yt_user {parameters}]{username}[/yt_user]
[yt_search]{search query}[/yt_search]
[yt_search {parameters}]{search query}[/yt_search]




where width and height is specified by x and y.  If width and height aren't specified, default size is 640x400.


The yt_user bbcode will show videos by the specified YouTube username.


The yt_search bbcode will show videos matching the provided search phrase.


This mod should be able to display a valid YouTube video when passing URLs, and more.  For example, all of the following will display the YouTube video at hxxp://www.yxxtube.com/v/fA4cphzsjn8:


[attachimg=1]



Optional parameters and values for all YouTube bbcodes are:

       
  • width = Specifies the width of the iframe area.
  • height = Specifies the height of the iframe area.
  • start = Specifies the number of seconds into the video to start at.
  • end = Specifies the number of seconds into the video to stop at.
  • autoplay = 1, yes, on or true
  • color = red or white
  • theme = dark or light
  • loop = 1, yes, on or true
  • controls = 0, no, off, hide or false
  • showinfo = 0, no, off, hide or false
  • o privacy = 1, yes, on or true
If you don't want YT links to appear as embedded videos, There is a new option under Profile => Look and Layout called Show YouTube videos as a link.  Checking this box makes the mod create links instead of embedded videos in your post.

That's all. Please enjoy - and report any issues!

Gryzor

Anyone tried it? Any issues?

ronaldo

I have used it before reading this notice and had no issue at all. It worked flawleslly :) (The only thing I can think of right now is that pressing youtube button without something selected gives you the openning youtube tag, but not the closing).



Gryzor

Does it? For me the YT button inserts both tags properly... what browser are you using?


Thanks :)

alex76gr

I never liked embedded YT videos on forum pages.
It saves time for sure but bloats the page and increases the loading times.
If all fails, just throw a hyperlink and you are done! :D

I still believe that i got my myopia from the green GT-65 monitor, but i can't prove it! :)

Gryzor

Yeah, but others (like me) don't like opening new pages. Loading time should be marginally affected since the elements load asynchronously - the web page loads independently of YT requests.


You could do like me - install a flash blocker that requires you to click on a Flash element to activate it.


Also, read the OP - you can disable embedding for your profile.

ronaldo

Quote from: Gryzor on 07:48, 12 May 15
Does it? For me the YT button inserts both tags properly... what browser are you using?

Thanks :)

I'm using firefox 37.0.2 on a Manjaro Linux :).

Gryzor

Quote from: ronaldo on 21:05, 12 May 15
I'm using firefox 37.0.2 on a Manjaro Linux :) .


Well, I'm not familiar with Killimanjaro or whatever, but I can confirm the bug with FF (38.0.5 here). I have reported it to the dev, let's see... thanks for reporting :)

Powered by SMFPacks Menu Editor Mod