How to enable a dynamic player size on YouTube

Advertisement

One of the things that have bothered me on YouTube for a while is the static player that the site uses. While you can select a small, large or full screen player, the site does not support anything in between.

Small is the default player size for instance and no matter which resolution of the video and browser window size you select, it stays the same size.

The same is true for the large player which does not adjust to screen size or resolution as well.

Up until now you had to use third-party tools such as this YouTube player resize extension for Firefox and Chrome, or the Unique YouTube Skin userscript to adjust the size of the player window beyond its limits.

Google is currently running an experiment on YouTube  that enables dynamic player sizes on the video hosting site. Experiments, for those who do not know, are tests enabled for some YouTube users to see how they react to the change.

A cookie that is set on the user system determines whether a visitor of the site takes part in the experiment. So, all you need to do to take part is to set that cookie as well.

Here is what you need to do for that

youtube resize dynamic

  • Open the YouTube website in your web browser of choice.
  • In Firefox, press Ctrl-Shift-K.
  • In Google Chrome or Opera 15+, press Ctrl-Shift-J.
  • In Internet Explorer, press F12.
  • This opens the console in all browsers mentioned above.
  • Paste the following line into the console and hit enter afterwards:  document.cookie="VISITOR_INFO1_LIVE=E_OLzg3yeLw; path=/; domain=.youtube.com";window.location.reload();
  • Refresh the page you are on if it is not reloaded automatically.

The effect is the following: Whenever you resize the browser window, YouTube will automatically adjust the size of the player and the video's resolution if possible to match it.

So, a 360p video playing in the small player is automatically enlarged when the browser window exceeds certain thresholds. What's interesting here is that there are more than the two sizes supported by default on YouTube, and that the quality and size is adjusted in both directions.

Go back

If you do not want to be part of the experiment for whatever reason, you can leave it at any time. To do so, simply clear all YouTube cookies. Alternatively, repeat the steps outlined above but use the following cookie information instead: document.cookie="VISITOR_INFO1_LIVE=; path=/; domain=.youtube.com";window.location.reload();

This nulls the cookie data and returns you to the default player behavior on the site. (via Googlesystem)

Please note that experiments may come and go at any time. What works right now may stop working the next minute, or be implemented natively on YouTube.

Please share this article

facebooktwittergoogle_plusredditlinkedinmail

Advertisement

Filed under:

Responses to How to enable a dynamic player size on YouTube

  1. Michael Fisher April 6, 2014 at 6:02 pm #

    Hi Martin

    These two Firefox addons work well together to fix most Youtube annoyances:-

    [1] https://addons.mozilla.org/en-US/firefox/addon/youtube-video-size/
    Watch Youtube videos in full page size

    [2] https://addons.mozilla.org/en-US/firefox/addon/youtube-control-center/
    Set preferred playback quality for all videos
    Set preferred video playback volume for all videos
    Control autoplay behavior of the YouTube player
    Control autobuffer behavior of the YouTube player
    Auto pause all YouTube players when a new player starts playing
    Show video annotations on the player
    Show video controls on player
    Autohide video controls after a video begins playing
    Play a single video in loop mode
    Change video player theme
    Skip flash advertisements in the player
    Hide/Show "video comments" pane
    Hide/Show "video views info" pane
    Hide/Show "action buttons" pane ('like', 'dislike', 'share', ... buttons)
    Hide/Show details" pane [published info, buy video, ...]

    • Martin Brinkmann April 6, 2014 at 6:52 pm #

      Michael thanks for recommending those, always good to have choice in this regard.

    • ilev April 7, 2014 at 6:49 am #

      @Seban
      Userscript doesn't work anymore in Chrome, which disables any extension not on Chrome store.

      • Martin Brinkmann April 7, 2014 at 7:57 am #

        Only in Chrome Stable and Beta on Windows.

  2. Sarah April 6, 2014 at 7:39 pm #

    Youtube has been automatically upping quality when you increase the size for a long time, and without the need for setting a cookie.

    • Martin Brinkmann April 6, 2014 at 7:52 pm #

      But you had to click on the large or small video player button for that, right?

    • ilev April 6, 2014 at 8:09 pm #

      I want always to view in HD format, even when the windows size is small, without the need to change quality settings each time.

  3. Seban April 6, 2014 at 8:36 pm #

    Some alternatives I know:

    The Firefox addon FlashResizer allows you to resize any flash video manually or automatically.
    https://addons.mozilla.org/de/firefox/addon/flashresizer/?src=search

    The Greasemonkey script 'Resize Youtube Player To Window Size' does what its name says.
    https://userscripts.org/scripts/show/153699

    • JohnP April 6, 2014 at 10:50 pm #

      I've been using this stylesheet: http://userstyles.org/styles/91256/
      which nicely enlarge the normal youtube player. No need for any js.

    • Blue April 7, 2014 at 9:05 pm #

      @Seban, your suggestion, "Resize Youtube Player To Window Size", only does that and nothing else. For a better script with much more options try: "Youtube Center": http://userscripts.org/scripts/show/114002

      It not only allows us to custom set the playback size and preference by a set number (240, 360,480,576,720,etc..), it can set player size according to the screen size by percentage (40%, 50%, 60%, 70%, etc... ). But it doesn't stop there, it can remove just about anything and everything, change buffering behavior, remove advertisements, remove elements, move elements around, darken the screen, provide 3rd party download links and more.

      It isn't limited to the videos on Youtube, it can change Youtube extension players on other sites that play Youtube videos, but wait there is more .... http://userscripts.org/scripts/show/114002

  4. Piter April 7, 2014 at 10:08 am #

    YouTube Center is the best addon to youtube only memory leak programmer must improve

  5. Dwight Stegall April 7, 2014 at 10:14 am #

    Here are many more Google and Youtube tests http://allgoogletesting.blogspot.com/

  6. aiden June 5, 2014 at 10:14 pm #

    thank you very much .My youtube player too small on full hd screen, even when I click large player .This script really hep me .
    sorry for my bad english

Leave a Reply