YouTube code improved

Misc topics

YouTube code improved

Postby dyn » Sun Mar 06, 2011 23:46 UTC

We use iframe tags now, which allows videos to be played on mobile devices and it fully supports HTML5. Domain is youtube-nocookie.com, which sets no cookies.
More info on this: http://www.google.com/search?ie=UTF-8&q=youtube+iframe&num=100

You can embed playlists with [ ytp] and 4:3 with [ yt43]. HD content with [ ythd] and normal videos with [ youtube] tags. Only video ID not entire url.


Let's say youtube video has url like: http://www.youtube.com/watch?v=videoID

Then you use that code inside tags:
Code: Select all
[youtube]videoID[/youtube]
User avatar
dyn
Site Admin
 
Posts: 3847
Joined: Mon Apr 14, 2008 07:50 UTC
Favorite map: q3dm8
Server: FFA
Website: https://vogonhq.com

Re: YouTube code improved

Postby dyn » Wed Sep 28, 2011 16:38 UTC

- Increased the default resolution from 640x512 to 720x514 to force 480p as default quality. It seems there must be at least 370,000 pixels for YT to switch to 480p.
- Player is now using latest player version 3.


In case you are still getting smaller player, delete browser cache, or press CTRL+F5 for hard/cache-less refresh.
User avatar
dyn
Site Admin
 
Posts: 3847
Joined: Mon Apr 14, 2008 07:50 UTC
Favorite map: q3dm8
Server: FFA
Website: https://vogonhq.com

Re: YouTube code improved

Postby dyn » Wed Sep 28, 2011 17:53 UTC

- switched to the new iframe/HTML5 code, which enables hardware acceleration in more cases than the old code

For acceleration to work you need updated browser and updated flash player. Updates are very important, because older versions either had bugs or didn't support it. Then you need hardware which is capable of acceleration. Get new flash player here: http://get.adobe.com/flashplayer/?no_redirect . Everything was tested with Adobe Flash Player 10.3.183.10.

Then, when video is playing right-click on it and select "Show video info", it should say "accelerated video rendering, accelerated video decoding", or at least "software video rendering, accelerated video decoding", which is the default for YouTube. So, if you watch videos here, you can get better acceleration than most YouTube users. :)

--
This is NOT required, but it may improve browsing even further:
Chrome - go to aboutflags or chrome//flags/ and enable "GPU compositing on all pages" and "Override software rendering list" may be needed on some systems. "GPU Accelerated Canvas 2D" should be enabled by default. IE9 and Firefox (latest) also should enable acceleration by default.
User avatar
dyn
Site Admin
 
Posts: 3847
Joined: Mon Apr 14, 2008 07:50 UTC
Favorite map: q3dm8
Server: FFA
Website: https://vogonhq.com


Return to General Discussion

Who is online

Users browsing this forum: CommonCrawl [Bot], Google [Bot] and 0 guests