Author Topic: Youtube Embedding - please read!  (Read 2191 times)

0 Members and 1 Guest are viewing this topic.

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.190
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Youtube Embedding - please read!
« on: 13:59, 09 May 15 »
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:


Code: [Select]

[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!

« Last Edit: 14:05, 09 May 15 by Gryzor »
like
0
No reactions

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.190
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Re: Youtube Embedding - please read!
« Reply #1 on: 20:46, 11 May 15 »
Anyone tried it? Any issues?
like
0
No reactions

Offline ronaldo

  • Dev
  • 6128 Plus
  • *****
  • Posts: 650
  • Country: es
    • Profesor Retroman
    • Awards
Re: Youtube Embedding - please read!
« Reply #2 on: 00:15, 12 May 15 »
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).

[youtube]https://www.youtube.com/watch?v=Bt9zSfinwFA[/youtube]

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.190
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Re: Youtube Embedding - please read!
« Reply #3 on: 09:48, 12 May 15 »
Does it? For me the YT button inserts both tags properly... what browser are you using?


Thanks :)
like
0
No reactions

Offline alex76gr

  • CPC664
  • ***
  • Posts: 143
  • Country: gr
    • Awards
Re: Youtube Embedding - please read!
« Reply #4 on: 09:55, 12 May 15 »
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

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

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.190
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Re: Youtube Embedding - please read!
« Reply #5 on: 09:58, 12 May 15 »
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.
like
0
No reactions

Offline ronaldo

  • Dev
  • 6128 Plus
  • *****
  • Posts: 650
  • Country: es
    • Profesor Retroman
    • Awards
Re: Youtube Embedding - please read!
« Reply #6 on: 23:05, 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 :).

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.190
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Re: Youtube Embedding - please read!
« Reply #7 on: 10:04, 13 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 :)
like
0
No reactions