mpvnet-player / mpv.net

🎞 mpv.net is a media player for Windows with a modern GUI.
GNU General Public License v2.0
3.51k stars 164 forks source link

[MBTN_LEFT cycle pause] causes video pausing when double-click (fullscreen toggle) #685

Open Mark-Joy opened 5 months ago

Mark-Joy commented 5 months ago

With [MBTN_LEFT cycle pause] or [MBTN_LEFT script-message-to mpvnet play-pause] in input.conf, video is cycle paused when left-mouse double-clicking (fullscreen toggle).

This can't be reproduced with mpv. In other words, this works as expected in mpv: left-mouse double-click only toggles fullscreen, and not causing video to pause/unpause.

Additional context Add any other context about the problem here.

  1. mpv.net version: v7.1.1.0
  2. mpv version: 0.38.0
  3. Windows version: Windows 10

May relating to #89

Sneakpeakcss commented 5 months ago

Try putting input-doubleclick-time=1 in mpv.conf and see if that fixes it for you.

Mark-Joy commented 5 months ago

input-doubleclick-time=1

It still causes video to cycle pause. Note that the fullscreen toggle feature works perfectly in original post even without input-doubleclick-time=1. It just that, after the fullscreen is toggled, the pausing is toggled as well.

Sneakpeakcss commented 5 months ago

I'm confused what's exactly the issue here.

By default mpv.net v7 doesn't bind anything under MBTN_LEFT and uses MBTN_LEFT ignore same as default mpv config. When MBTN_LEFT cycle pause is used in mpv then it has the same behaviour of cycling pause/play during doubleclick (fullscreen).

Mark-Joy commented 5 months ago

By default mpv.net v7 doesn't bind anything under MBTN_LEFT

https://github.com/mpvnet-player/mpv.net/blob/3f52c1255e68389c57b2ebdeb5f9bce09cdbf827/src/MpvNet/InputHelp.cs#L205 MBTN_LEFT is bind with ignore by default in mpv.net. In mpv, it isn't bind by anything by default. And the only line in my input.conf is MBTN_LEFT cycle pause, for both mpv.net and mpv

Sneakpeakcss commented 5 months ago

(...) and uses MBTN_LEFT ignore same as default mpv config.

MBTN_LEFT is bind with ignore by default in mpv.net. In mpv, it isn't bind by anything by default.

options-input-default-bindings / input-builtin-bindings

input.conf

image

What you're describing is literally default mpv behaviour, and using MBTN_LEFT cycle pause with a clean install of mpv behaves the same as you mentioned:

https://github.com/mpvnet-player/mpv.net/assets/77424331/d56bc0ce-a25b-424a-80e1-9a4da5b82d5a

Mark-Joy commented 5 months ago

Ok. Let me explain in a bit more details: Suppose the video was in pause state before left-mouse double-clicking

Suppose the video was in play state before left-mouse double-clicking

In other words, in mpv the play/pause state is not changed after double-clicking. While in mpv.net the play/pause state is toggle after double-clicking

Sneakpeakcss commented 5 months ago

Ok. Let me explain in a bit more details: Suppose the video was in pause state before left-mouse double-clicking

* In `mpv`: after double-clicking, the video is still on **`pause`** state

* In `mpv.net`: after double-clicking, the video is changed to **`play`** state

Suppose the video was in play state before left-mouse double-clicking

* In `mpv`: after double-clicking, the video is still on **`play`** state

* In `mpv.net`: after double-clicking, the video is changed to **`pause`** state

In other words, in mpv the play/pause state is not changed after double-clicking. While in mpv.net the play/pause state is toggle after double-clicking

This sounds like it's related to this then, and from the response in that issue it probably won't get fixed anytime soon.

[edit] Yea, most certainly related to the same issue:

MBTN_Left script-message-to console type "print-text 'MBTN_Left'" ; keypress ENTER
MBTN_Left_dbl script-message-to console type "print-text 'MBTN_Left_dbl'" ; keypress ENTER

image

Mark-Joy commented 5 months ago

https://github.com/mpvnet-player/mpv.net/blob/3f52c1255e68389c57b2ebdeb5f9bce09cdbf827/src/MpvNet/InputHelp.cs#L205 Well, I suppose there's no good reason for why the above code should be there. I mean, it is hard coded and furthermore it is bound to ignore

wooshaq commented 5 months ago

How does net changes mouse to regular mpv?