PDA

View Full Version : BB Code Enhancements - youtubeHD BB code


OUTL4W
11-22-2013, 11:00 PM
I see many bb codes for youtube and vb4 has the default video code button...but this mod embeds the hd version of the video without user manually selecting the hd version.

Also not sure if anyone else has this issue but when clicking the default video button and the window pops up:

http://i155.photobucket.com/albums/s294/404error_head/Untitled-28.png~original

unable to scroll horizontally to click ok....so I have to hit ctrl and minus key to shrink window down enough to click ok....which is why I created the YT bb code on my vb4 forum. Also when using the default video button will play 360p version by default so I created the custom yt BB code below that will play hd version of the video if available by default.

Add a new bbcode (AdminCP > Custom BB Codes > Add New BB Code)

Title: YoutubeHD
BB Code Tag Name: ythd

replacement:
<iframe width="600" height="400" src="http://www.youtube.com/embed/{param}?hd=1&vq=hd1080&rel=0" frameborder="0" allowfullscreen></iframe>

remember just copy the alpha-numeric characters that follow the "v="

http://www.youtube.com/watch?feature=player_embedded&v=578nd9swh7E

example: 578nd9swh7E

this will play the hd version if available by default without having member manually select it.....1080p by default but if 1080p isn't available then it will play the 720p by default. It also won't show relative videos when done playing but if you want to show relative videos then remove "&rel=0"

this should work on all vB versions....

please mark as installed....thanks

if wanting to add pic for button
https://vborg.vbsupport.ru/external/2013/11/21.png

djbaxter
11-23-2013, 07:54 PM
There's something wrong with your templates. The standard built-in video code text box should not look like that.

Also, as far as I know, whether or not the embedded video plays in regular or HD depends on the original video, not on the native BBCode.

OUTL4W
11-23-2013, 08:07 PM
There's something wrong with your templates. The standard built-in video code text box should not look like that.

Also, as far as I know, whether or not the embedded video plays in regular or HD depends on the original video, not on the native BBCode.

when I embed this video url
http://www.youtube.com/watch?feature=player_embedded&v=578nd9swh7E
into the default video code...it plays @ 360p by default but when I 578nd9swh7E will play the 1080p version by default.