Large

YouTube HD Ultimate

By Avindra V.G. Last update Dec 10, 2010 — Installed 402,053 times.

New Feature- Click

in
Subscribe to New Feature- Click 25 posts, 6 voices



AC11 User

Hi,
Is there a possibility to play/pause a video if you click on the video itself?
Thanks

 
Avindra V.G. Script's Author

unless i'm mistaken --- that's how it already is. make sure you have the latest firefox + flash if that isn't how it already is.

 
JoeSimmons Scriptwright

He means clicking on the video frame to pause/play it, like this: http://userscripts.org/scripts/show/40997

 
Avindra V.G. Script's Author

I understand the request... click on the video to toggle play/pause. But, that functionality already exists. Try it with GM turned off temporarily, it works for me.

 
JoeSimmons Scriptwright

Oh didn't know you put that in... did you make your own code?

 
Avindra V.G. Script's Author

did you try it? it just works, i didn't do anything

 
zornn User

I've got the latest Flash and Firefox version, but don't have that functionality by default. I know I've got the latest versions because I check with this program http://cleansofts.org/ regularly.

I tried it with GM off and GM on, but with every script disabled except yours. It still doesn't work.

Are you using Windows or a Mac?

 
JoeSimmons Scriptwright

No, didn't try it for a while. Will try it now on another profile with just that script and tell you how it goes.

 
JoeSimmons Scriptwright

Doesn't work for me or anyone else. You sure you don't have my script installed? It doesn't pause when you click on the video, only the pause button.

 
Avindra V.G. Script's Author

okay, you guys bitched, and you got your feature. please tell me if it's working ;)

consider using my code joe, i see you used a ton of intervals/timeouts in yours.

 
AC11 User

Thanks it works great.
I just noticed that there are replies to this topic!

 
JoeSimmons Scriptwright
Avindra Gool... wrote:
consider using my code joe, i see you used a ton of intervals/timeouts in yours.
Could you tell me how it works and pastebin the code from it? Your code is hard to read.
 
zornn User

I can't use the video controller... It's like I click on it and nothing happens. Anybody else?

And I don't understand why you need this:

if(new Date().toString()==didEvent) return;
didEvent = new Date().toString();

It just delays the time between the clicks.

I believe you should also increase (e.layerY > this.offsetHeight - 25) to 75 or more like Joe did, because otherwise you'll pause the video when you adjust the volume. I don't know if you overcame this problem, because like I said, I can't use the controller... I'm just assuming this is so.

 
Avindra V.G. Script's Author

it doesn't just delay clicks.... it is needed because the event is triggered twice. flash + javascript interaction is very finicky. i had to fuck around with it a lot to figure it out.

i'll consider changing it to 75, although you aren't changing the volume all the time..

and what do you mean by you can't use the video controller?

please give me the result of this when you go to it in the address bar:

javascript:void(prompt("Copy + paste this:", navigator.userAgent));

 
zornn User

I don't know, it worked okay when I removed that part...

I mean that I can't use the actual pause button, I can't skim through the video, I can't adjust the volume (if I hover over the volume button, it doesn't slide the volume bar as it should - nothing happens), can't click on the HQ button... Basically nothing in the controller is clickable.

Mozilla/5.0 (Windows; U; Windows NT 5.1; sl; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11

 
Node User

Any chance of adding the option to disable this feature? It's annoying when playback stops every time when you're in a middle of adjusting the volume.

 
Avindra V.G. Script's Author

@Node: In the future version, changing volume will not pause / play the video.

@x0rnn: I'm not sure why you and Joe are having this problem. I'll try another approach when I have time.

 
zornn User

The new version fixed that as I said in this topic: http://userscripts.org/topics/28879

Node, check my post above for a temporary fix.

 
Node User

Thanks for the workaround x0rnn.

 
Avindra V.G. Script's Author

yeah thats why i love this script; everybody pitches in :)

 
JoeSimmons Scriptwright
Avindra Gool... wrote:
yeah thats why i love this script; everybody pitches in :)
Did you try the code I made for you yet?

Btw, I can't click anywhere below the video i.e., the seek bar. It just pauses. That's why I used an overlaying div in my script with 25px subtracted from the height.

EDIT: Fixed the auto cinema problem I had. It was because I put the new create() code in. I will send you the code by email.
 
zornn User

As promised, changing the volume doesn't affect it in the new version. Nice workaround. :)

By the way, YouTube already has "space" assigned to pause by default.

Oh and I changed the code a bit so I can use these two buttons when the video ends: http://i42.tinypic.com/2j1v0yc.png
If anyone wants it and it'll save time from experimenting:

if ((x>=100 && x<=125 && y<=90) || (y>=230 && y<=300 && (x<=25 && x>=0 || x>=829 && x<=854) || y<=25))

You'll also have to change the values of 230, 300, 829 and 854 if you're using the fit to window option.

 
Avindra V.G. Script's Author
FirefoxWindows

i think loop is working again, try it out

 
zornn User
FirefoxWindows

Yes, it is.

By the way, "p" "m" "r" and "e" are all activated if I type any of the letters in the comment or search box. Could you do it so they only work when the video is in focus? "p" is also unneeded, because "space" is already assigned to do the same thing by default.

Edit: fixed with

if(e.target.nodeName=='TEXTAREA' || e.target.nodeName=='INPUT') return;

 
WikiLeon User
FirefoxWindows

Is it possible for the click and hotkey functions to be toggled in the options dialog?

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