fabio Posted November 18, 2012 Report Share Posted November 18, 2012 (edited) I want to report a problem I notice with YouTube video embedded in the forum (using latest Firefox here). It seems that the forum always force the video to be played with Flash, even if I choose to use YouTube HTML5 when available.Just as an example see this post with embedded video. It plays with Flash on the forum, but when clicking to see it on YouTube the video is also available in HTML5/Webm. I have this problem only on 0 A.D. forum, see for example the video embedded in sauerbraten web page, it's correctly displayed in HTML5 mode.A possibly related problem is that when using my slow netbook video embedded in the forum make the page hugely slow. When the video is displayed in Flash mode in YouTube is pretty fast, so I suppose it's the forum it's embedding YouTube videos, possibly related to the forced resizing applied to the video:<object style="height: 390px; width: 640px"> Edited October 4, 2013 by fabio Quote Link to comment Share on other sites More sharing options...
quantumstate Posted November 18, 2012 Report Share Posted November 18, 2012 For reference here is the code used by our forum<object style="[url=""]height: 390px; width: 640px[/url]"><param name="[url=""]movie[/url]" value="[url=""]http://youtube.com/v/gDndZn0YPdI?version=3[/url]"><param name="[url=""]allowFullScreen[/url]" value="[url=""]true[/url]"><param name="[url=""]allowScriptAccess[/url]" value="[url=""]always[/url]"><embed src="[url="view-source:http://youtube.com/v/gDndZn0YPdI?version=3"]http://youtube.com/v/gDndZn0YPdI?version=3[/url]" type="[url=""]application/x-shockwave-flash[/url]" allowfullscreen="[url=""]true[/url]" allowscriptaccess="[url=""]always[/url]" height="[url=""]360[/url]" width="[url=""]640[/url]"></object>and the sauerbraten website<iframe src="[url="view-source:http://www.youtube.com/embed/EsTkLZhMI0I?rel=0"]http://www.youtube.com/embed/EsTkLZhMI0I?rel=0[/url]" allowfullscreen="" frameborder="[url=""]0[/url]" height="[url=""]320[/url]" width="[url=""]400[/url]"></iframe>So it is a simple formatting issue, though I don't know how easy it would be to change without causing hassle every time we upgrade. Quote Link to comment Share on other sites More sharing options...
fabio Posted November 18, 2012 Author Report Share Posted November 18, 2012 The forum changed the link you posted. Here are the fixed code.This is what happens on sauerbraten:<iframe width="400" height="320" src="http://www.youtube.com/embed/EsTkLZhMI0I?rel=0" frameborder="0" allowfullscreen></iframe>This is current 0 A.D.:<object style="movie" value="allowFullScreen" value="allowScriptAccess" value="http://youtube.com/v/gDndZn0YPdI?version=3" type="true" allowScriptAccess="640" height="360"></embed></object>This is what YouTube suggests when clicking on the previous video to watch on YouTube, right click and "copy HTML...":<iframe width="640" height="390" src="http://www.youtube.com/embed/gDndZn0YPdI" frameborder="0" allowfullscreen></iframe>This one looks like the sauerbraten, other than the missing ?rel=0. Can this last one be used rather than the current one, since it is what YouTube suggest? Quote Link to comment Share on other sites More sharing options...
k776 Posted November 18, 2012 Report Share Posted November 18, 2012 The <object> approach was YouTube's older video embed syntax. The <iframe> is YouTube's newer one. If we're using <object> it's because they didn't use <iframe> at the time this forum was set up.A quick glance looks like the code that parses the youtube urls/media tags here on this forum is contained within admin/sources/classes/bbcode/custom/defaults.php. In theory it's possible to make changes, but I'd recommend not doing it because it'll complicate upgrading the forum. Quote Link to comment Share on other sites More sharing options...
fabio Posted November 19, 2012 Author Report Share Posted November 19, 2012 OK, thanks. You may want to try youtube-auto-iframes script.See also: http://xahlee.info/j...video_code.html Quote Link to comment Share on other sites More sharing options...
fabio Posted November 26, 2012 Author Report Share Posted November 26, 2012 Reported as ticket 1730. Quote Link to comment Share on other sites More sharing options...
fabio Posted October 1, 2013 Author Report Share Posted October 1, 2013 Fixed with updated forum software. HTML5 videos on forum, finally! 2 Quote Link to comment Share on other sites More sharing options...
implodedok Posted October 1, 2013 Report Share Posted October 1, 2013 Hooray! :-) Glad it's working. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.