Youtube without Flash Auto

By YoutubeWithoutFlash Last update Jan 30, 2011 — Installed 97,118 times.

Resizing non-flash player

in
Subscribe to Resizing non-flash player 4 posts, 3 voices



magical_graam Scriptwright
MozillaX11

Above the video, next to the title, is a button used to make the video player bigger. I wanted this to work with your great script, so I added it! These changes allow the non-flash video player to resize using youtube's button

First, I changed the writePlayerxx() functions to:

playerDiv.innerHTML = '<embed id="no-flash-player" type="application/x-mplayer2"...
resizePlayer();

and added this at the end of the script:
function resizePlayer() {
    var player = document.getElementById('no-flash-player');
    if (!(player == null)) {
        if (unsafeWindow._hasclass(unsafeWindow._gel('baseDiv'), 'watch-wide-mode')) {
            player.width = 960;
            player.height = 582;
        } else {
            player.width = 640;
            player.height = 388;
        }
    }
}
document.getElementById('player-toggle-switch').addEventListener('click', resizePlayer, false);
resizePlayer();

the unsafeWindow._hasclass(unsafeWindow._gel('baseDiv'), 'watch-wide-mode') is used to see if the player is widescreen or not. Hope you include this and keep up the good work!

 
YoutubeWitho... Script's Author
FirefoxX11

Thanks for the patch, works great. I included it in the current version.

 
magical_graam Scriptwright
MozillaX11

Glad I could help

 
JohnSF User
SeamonkeyWindows

Left-clicking toggles between full-screen and whatever size
you've set with the other controls. I still miss the Play/Pause...

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel