#1
|
|||
|
|||
YouTube embeds (request to admins)
Would it be possible to change the YouTube embedding code so that it uses the iframe player rather than the old Flash-only one? The iframe version can use HTML5 video tags if the browser supports it (which is awesomeness for battery life on laptops, as Flash sucks up loads of CPU), and has far more options.
The src of the iframe would be something like: Code:
http://www.youtube.com/embed/{INSERT-VIDEO-ID-HERE-LOL}?theme=light&modestbranding=1&fs=0&enablejsapi=0&disablekb=1&autoplay=0&version=3&origin=http://social-anxiety-community.org You will need to sanitise video ids by ignoring video IDs that aren't 11 characters and that don't match a regexp like \w\- (alphanumerics, underscores and hyphens) for safety – not sure if vBulletin can filter BBcode parameters that way, but I'd be surprised if it can't. Shouldn't change the user experience for 90% of users, but it means that embeds will work on systems without Flash (e.g. on certain mobile devices, or for people who don't want to install it), so it's worth a try if you've got the time to do it. |
#2
|
|||
|
|||
Re: YouTube embeds (request to admins)
^^ neat idea. I often browse this site without flash and html5 embedded vids would be great!
|
#3
|
|||
|
|||
Re: YouTube embeds (request to admins)
Would this allow the videos to appear at full resolution, the current method means they appear in a tiny window.
|
#4
|
|||
|
|||
Re: YouTube embeds (request to admins)
Quote:
In this case, the main advantage of using the iframe would be HTML5. There's other neat things you can do with it as well (you get proper interaction between the player and the site, so you can control the player from elsewhere on the page and use the events from the player to control your own scripts, e.g. dim the rest of the page when the player is running, getting the info of the video to use outside of the player), but they're not really relevant to forum embeds. It's basically a direct upgrade/drop-in replacement, anyway. |
#5
|
|||
|
|||
Re: YouTube embeds (request to admins)
Cheers for this DoP.
|