Youtube have many new update ,
so i'm try hack this , for html5 and RWD...
hack point
1. compatible https
2. compatible long url and short url
3. of cause html5 , no flash
4. for bootstrap3 responsive embed , 16:9 and 4:3 and RWD
5 .mobile can full screen
just edit 2 files
\class\textsanitizer\youtube\youtube.php
\language\english\formdhtmltextarea.php
step1. edit \class\textsanitizer\youtube\youtube.php
old default height and width
le="color: #000000"><?php var text2 = prompt(enterFlashWidthPhrase, "425"); var text3 = prompt(enterFlashHeightPhrase, "350");
change to 16:9
le="color: #000000"><?php var text2 = prompt(enterFlashWidthPhrase, "16"); var text3 = prompt(enterFlashHeightPhrase, "9");
--
old only long url
le="color: #000000"><?php if (!preg_match("/^http://(www.)?youtube.com/watch?v=(.*)/i", $url, $matches)) { trigger_error("Not matched: {$url} {$width} {$height}", E_USER_WARNING); return ""; } $src = "http://www.youtube.com/v/" . $matches[2];
change to compatible long url and short url , (i'm code beginner, so stupid code)
le="color: #000000"><?php if (preg_match("/^http[s]?://(www.)?youtu.be/(.*)/i", $url, $matches) ) { } elseif (preg_match("/^http[s]?://(www.)?youtube.com/watch?v=(.*)/i", $url, $matches)) { } else{ trigger_error("Not matched: {$url} {$width} {$height}", E_USER_WARNING); return ""; } $src = "http://www.youtube.com/embed/" . $matches[2];
--
old for flash object
le="color: #000000"><?php $code = "<object width='{$width}' height='{$height}'><param name='movie' value='{$src}'></param>" . "<param name='wmode' value='transparent'></param>" . "<embed src='{$src}' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed>" . "</object>";
change to bootstrap3 RWD embed-responsive 16by9 and 4by3
le="color: #000000"><?php $code = "<div class='embed-responsive embed-responsive-{$width}by{$height}'>" . "<iframe frameborder='0' class='embed-responsive-item' src='{$src}?controls=1&showinfo=0&rel=0&disablekb=1' allowfullscreen></iframe></div>";
--
step2. edit language \language\english\formdhtmltextarea.php
le="color: #000000"><?php define('_XOOPS_FORM_ALT_ENTERHEIGHT','(Video 16:9 or 4:3) input Height 9 or 3 :'); define('_XOOPS_FORM_ALT_ENTERWIDTH','(Video 16:9 or 4:3) input Width 16 or 4 :');
done!
try this
use newbb dhtml , click youtube, paste short url

input video width , default 16

input video height , default 9

test more, long and short , 16:9 and 4:3

post topic , video is widescreen , so black of 4:3 .

try my mobile phone, RWD ok !

thanks , i'm come from taiwan. (not china)
my english very pool , so embarrassed
everybody can change my pool translate :P
and hope next version have new best youtube code.
my blog
http://3q.9527.tw/80