06 April 2014

A YouTube Experiment Resizes the Player Dynamically



There's a new YouTube experiment that changes the video player's size, depending on the browser window's size. When resizing Chrome's window, YouTube switches from 360p to 480p and to 720p, while the player gets bigger.



Here's the same video in a larger player (480p) and an almost fullscreen player (720p) on a 1080p display:









YouTube's "stats for nerds" show the size of the player ("dimensions") and the video resolution:






The nice thing is that the player resizes automatically and you don't have to click a button. It's the power of responsive design. The YouTube player still has a "large player" button, but it only moves the right sidebar and centers the player.



How to try the new interface? If you use Chrome, Firefox, Opera, Safari or Internet Explorer 8+:



1. open youtube.com in a new tab



2. load your browser's developer console:



* Chrome or Opera 15+ - press Ctrl+Shift+J for Windows/Linux/ChromeOS or Command-Option-J for Mac



* Firefox - press Ctrl+Shift+K for Windows/Linux or Command-Option-K for Mac



* Internet Explorer 8+ - press F12 and select the "Console" tab



* Safari 6+ - if you haven't enabled the Develop menu, open Preferences from the Safari menu, go to the Advanced tab and check "Show Develop menu in menu bar". Close Preferences and then press Command-Option-C to show the console.



* Opera 12 - press Ctrl+Shift+I for Windows/Linux or Command-Option-I for Mac, then click "Console".



3. paste the following code which changes a YouTube cookie:



document.cookie="VISITOR_INFO1_LIVE=E_OLzg3yeLw; path=/; domain=.youtube.com";window.location.reload();



4. press Enter and close the console.



To go back to the regular interface, use the same instructions, but replace the code from step 3 with this one:



document.cookie="VISITOR_INFO1_LIVE=; path=/; domain=.youtube.com";window.location.reload();



{ Thanks, Maurice Wahba. }

No comments:

Post a Comment