Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to control pause state while seeking with mouse move #66

Merged
merged 3 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/USER_OPTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Create `modernz.conf` in your mpv script-opts directory:
| seekrangealpha | 150 | transparency of seekranges |
| livemarkers | yes | update seekbar chapter markers on duration change |
| osc_on_seek | no | show osc when seeking |
| mouse_seek_pause | yes | should the video pause while seeking with mouse move? (on button hold) |
| automatickeyframemode | yes | set seekbarkeyframes based on video length to prevent laggy scrubbing on long videos |
| automatickeyframelimit | 600 | videos of above this length (in seconds) will have seekbarkeyframes on |

Expand Down
2 changes: 2 additions & 0 deletions modernz.conf
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ seekrangealpha=150
livemarkers=yes
# show osc when seeking? or input.conf: x script-message-to modernz osc-show
osc_on_seek=no
# should the video pause while seeking with mouse move? (on button hold)
mouse_seek_pause=yes
# set seekbarkeyframes based on video length to prevent laggy scrubbing on long videos
automatickeyframemode=yes
# videos of above this length (in seconds) will have seekbarkeyframes on
Expand Down
3 changes: 2 additions & 1 deletion modernz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ local user_opts = {
livemarkers = true, -- update seekbar chapter markers on duration change

osc_on_seek = false, -- show osc when seeking? or input.conf: x script-message-to modernz osc-show
mouse_seek_pause = true, -- should the video pause while seeking with mouse move? (on button hold)

automatickeyframemode = true, -- set seekbarkeyframes based on video length to prevent laggy scrubbing on long videos
automatickeyframelimit = 600, -- videos of above this length (in seconds) will have seekbarkeyframes on
Expand Down Expand Up @@ -1977,7 +1978,7 @@ local function osc_init()
-- mouse move events may pile up during seeking and may still get
-- sent when the user is done seeking, so we need to throw away
-- identical seeks
if mp.get_property("pause") == "no" then
if mp.get_property("pause") == "no" and user_opts.mouse_seek_pause then
state.playingWhilstSeeking = true
mp.commandv("cycle", "pause")
end
Expand Down