nurupo / vlc-pause-click-plugin

Plugin for VLC that pauses/plays video on mouse click
GNU Lesser General Public License v2.1
945 stars 64 forks source link

fullscreen double-click speed doesn't do anything (?) #64

Closed nr1995 closed 4 years ago

nr1995 commented 4 years ago

Windows 10, 64-bit VLC v3.0.10, 64-bit

Tools -> Preferences -> All -> Video -> Filters -> Pause click -> Double click interval (ms)

No matter how quick I set the double-click to be, the window still seems absolutely massive. Like half a second or more, resulting in loads of unwanted fullscreen toggles. Changing how many milliseconds doesn't seem to change anything at all. Am I doing something wrong here?

nurupo commented 4 years ago

Do you have the "Ignore double clicks" option checked? "Double click interval" doesn't do anything unless "Ignore double clicks" is checked, "Double click interval" is a fine-tuning option for the "Ignore double clicks" option.

The idea behind this is that when you first click, the plugin doesn't pause right away but schedules the pause to trigger after the specified number of milliseconds in the future, iff no second click was made. If there was a second click made within that interval, e.g. you were going full screen, the previously scheduled pause gets canceled. So when you click just once, VLC does pause but the pause is slightly delayed by the Double click interval, but when you click twice within the Double click interval, VLC doesn't pause. This is the behavior YouTube web player has, for example.

If you don't check "Ignore double clicks" then VLC pauses on every click you make, immediately, without a delay.

Anyway, to test that it's working, check "Ignore double clicks" and set "Double click interval" to 300 and try to double-click to full screen -- the video should not change its current state. However, if you test the same with "Ignore double clicks" unchecked, the video will briefly pause/play every single time you full screen.

nr1995 commented 4 years ago

I didn't have “Ignore double clicks” checked when I posted. I've checked it now though, and now I see how it works. However, I thought the “double click interval” setting would change how fast you had to double-click to trigger full screen. I wanted to make the required double-click speed really fast, requiring the user's intention and preventing accidental full screen toggles, which are much more annoying than having the video be in the wrong play/pause state. I hope you don't think I'm sounding arrogant, but don't you think that's how the feature should work?

nurupo commented 4 years ago

Oh, I see what you mean. It is possible to do, but it would be too much work for something very niche which can accidentally miss if you double-click fast enough when you meant to pause. It would also make settings a mess, because it's an exclusive option with "Ignore double clicks", having both of them enabled makes no sense. I suggest instead to uncheck "Ignore double clicks", check "Disable fullscreen toggle on double click" and set "Assign fullscreen toggle to" to "Middle Button". That way you can click however you like - it won't full screen. To full screen you'd click on the mouse wheel.

nr1995 commented 4 years ago

Yes that's the setup I settled on. Although I did it through AutoHotkey since I hate navigating VLC's menus.

If WinActive("ahk_exe vlc.exe")

Mbutton::f

If

Thanks for your plugin anyway.

nurupo commented 4 years ago

I don't think your AutoHotkey script prevents accidental double-clicks from full-screening VLC, it looks like it just rebinds middle mouse to f key. Then again, AutoHotkey has this funky syntax that I'm not familiar with, so maybe this does prevent double-clicking.

Anyway, let's keep this issue open for a while, I will think about it. I worked out how to code this, it's actually easier than what I have initially thought, just a few lines of extra code, but I have no idea how to change the layout of the settings page so that it would make sense with toggles for this feature added. Hm, or perhaps there is no need to change anything at all? Technically the existing "Double click interval" number selector could be reused instead of introducing another one, and the "Custom full-screen double click interval" (WIP option name) kind of plays in hand with the "Ignore double clicks" option, in fact you'd want both of them enabled and set to the same time value to achieve your desired use case, so they are not exclusive as I have initially thought... Anyway, I will think about it and will come back later. I think I will likely implement it but not promises :P

nurupo commented 4 years ago

Could you test it and say if this is what you wanted?

The code is in fix-ignore-double-click branch if you want to build it yourself.

If you check “Ignore double clicks” and you have "Mouse button" set to Left Button, you should be able to control double-click-to-fullscreen time interval using the "Double click interval (milliseconds)" option, making it shorter or longer. So you could make it that you have to double click no longer than within 200ms to fullscreen. It won't pause/play the video when fullscreening, honoring the “Ignore double clicks” intention, but I will make it possible to adjust the fullscreen interval without it ignoring double clicks later, as an option.

This improves the behavior of the “Ignore double clicks” option, so it will get included in the next release, once I implement the feature requested in another issue and re-structure the settings page, grouping similar options together.

nurupo commented 4 years ago

Here is vlc-3.0-64bit-win.zip based on the master branch, with

but I will make it possible to adjust the fullscreen interval without it ignoring double clicks later, as an option

added and

re-structure the settings page

done.

nr1995 commented 4 years ago

Yeah that seems to work nicely. Thanks man.

nurupo commented 4 years ago

Cool, glad it worked for you.

Note that that test build has a small regression: the option to disable the context menu pop up doesn't work properly. It's fixed in the master branch and will be fixed in the upcoming release.