Minor rewrite, merging seekbar and progressbar into one timeline

This commit is contained in:
Tomas Sardyha
2020-04-06 11:34:25 +02:00
parent 8b1d9567de
commit d982bc2a9f
3 changed files with 488 additions and 520 deletions

View File

@@ -27,50 +27,45 @@ To configure **uosc**, create a `script-opts/uosc.conf` file, or download [`uosc
## Options ## Options
Terminology:
- **Seekbar**: thick clickable seeking bar with elapsed/remaining times that appears when mouse is near it
- **Progressbar**: thin persistent video progress bar
All available options with their default values: All available options with their default values:
```conf ```conf
# display window title (filename) in no-border mode # timeline size when fully retracted, 0 will hide it completely
title=no timeline_size_min=1
# timeline size when fully expanded, in pixels, 0 to disable
# seekbar size in pixels, 0 to disable timeline_size_max=40
seekbar_size=40
# same as ^ but when in fullscreen # same as ^ but when in fullscreen
seekbar_size_fullscreen=60 timeline_size_min_fullscreen=0
# seekbar opacity when fully visible timeline_size_max_fullscreen=60
seekbar_opacity=0.8 # timeline opacity
# seekbar chapters indicator style: dots, lines, lines-top, lines-bottom timeline_opacity=0.8
# set to empty to disable # pads the elapsed bar from top, effectively creating a top border of background
seekbar_chapters=dots # color to help visually separate elapsed bar from video of similar color
# seekbar chapters indicator opacity # in no border windowed mode bottom is padded as well to separate from whatever
seekbar_chapters_opacity=0.3 # is behind current window
# this might be unwanted if you are using unique/rare colors with low overlap
# chance, so you can disable it by setting to 0
timeline_padding=1
# progressbar size in pixels, 0 to disable # timeline chapters indicator style: dots, lines, lines-top, lines-bottom
progressbar_size=1
# same as ^ but when in fullscreen
progressbar_size_fullscreen=0
# progressbar opacity
progressbar_opacity=0.8
# progressbar chapters indicator style: dots, lines, lines-top, lines-bottom
# set to empty to disable # set to empty to disable
progressbar_chapters=dots chapters=dots
# progressbar chapters indicator opacity # timeline chapters indicator opacity
progressbar_chapters_opacity=0.3 chapters_opacity=0.3
# proximity below which opacity equals 1 # proximity below which elements are fully faded in/expanded
min_proximity=40 proximity_min=40
# proximity above which opacity equals 0 # proximity above which elements are fully faded out/retracted
max_proximity=120 proximity_max=120
# BBGGRR - BLUE GREEN RED hex code # BBGGRR - BLUE GREEN RED hex codes
color_foreground=FFFFFF color_foreground=ffffff
# BBGGRR - BLUE GREEN RED hex code color_foreground_text=000000
color_background=000000 color_background=000000
color_background_text=ffffff
# hide proximity based elements when mpv autohides the cursor # hide proximity based elements when mpv autohides the cursor
autohide=no autohide=no
# display window title (filename) in top window controls bar in no-border mode
title=no
# `chapter_ranges` lets you transform chapter indicators into range indicators # `chapter_ranges` lets you transform chapter indicators into range indicators
# with custom color and opacity by creating a chapter range definition that # with custom color and opacity by creating a chapter range definition that
@@ -124,26 +119,24 @@ By default, **uosc** doesn't create any keybinds, but provides commands to bind
For example, this will bind the `p` key to toggle progress bar: For example, this will bind the `p` key to toggle progress bar:
``` ```
p script-binding uosc/toggleprogressbar p script-binding uosc/toggletimeline
``` ```
## Commands ## Commands
Available commands **uosc** listens on: Available commands **uosc** listens on:
#### `toggleprogressbar` #### `toggletimeline`
Toggle the thin discrete progress bar. Force expands/retracts the bottom timeline until next mouse move, which will reset its state.
#### `toggleseekbar`
Toggle seekbar manually instead of moving a pointer to it. Useful to check times without touching the pointer device.
The toggled state is reset immediately on next pointer move.
## Tips ## Tips
If the UI feels sluggish to you, it's probably because the rendering is chained to video frame rate. Add this to your `mpv.conf` file to enable interpolation and get a more responsive UI: If the UI feels sluggish to you, it's probably because the rendering is chained to playing video frame rate.
You can test the smoother operation by pausing the video and then using the UI, which will make it render closer to display refresh rate.
To get this smoothness also while video is playing, add this to your `mpv.conf` file to enable interpolation:
``` ```
interpolation=yes interpolation=yes

View File

@@ -1,40 +1,39 @@
# display window title (filename) in no-border mode # timeline size when fully retracted, 0 will hide it completely
title=no timeline_size_min=1
# timeline size when fully expanded, in pixels, 0 to disable
# seekbar size in pixels, 0 to disable timeline_size_max=40
seekbar_size=40
# same as ^ but when in fullscreen # same as ^ but when in fullscreen
seekbar_size_fullscreen=60 timeline_size_min_fullscreen=0
# seekbar opacity when fully visible timeline_size_max_fullscreen=60
seekbar_opacity=0.8 # timeline opacity
# seekbar chapters indicator style: dots, lines, lines-top, lines-bottom timeline_opacity=0.8
# set to empty to disable # pads the elapsed bar from top, effectively creating a top border of background
seekbar_chapters=dots # color to help visually separate elapsed bar from video of similar color
# seekbar chapters indicator opacity # in no border windowed mode bottom is padded as well to separate from whatever
seekbar_chapters_opacity=0.3 # is behind current window
# this might be unwanted if you are using unique/rare colors with low overlap
# chance, so you can disable it by setting to 0
timeline_padding=1
# progressbar size in pixels, 0 to disable # timeline chapters indicator style: dots, lines, lines-top, lines-bottom
progressbar_size=1
# same as ^ but when in fullscreen
progressbar_size_fullscreen=0
# progressbar opacity
progressbar_opacity=0.8
# progressbar chapters indicator style: dots, lines, lines-top, lines-bottom
# set to empty to disable # set to empty to disable
progressbar_chapters=dots chapters=dots
# progressbar chapters indicator opacity # timeline chapters indicator opacity
progressbar_chapters_opacity=0.3 chapters_opacity=0.3
# proximity below which opacity equals 1 # proximity below which elements are fully faded in/expanded
min_proximity=40 proximity_min=40
# proximity above which opacity equals 0 # proximity above which elements are fully faded out/retracted
max_proximity=120 proximity_max=120
# BBGGRR - BLUE GREEN RED hex code # BBGGRR - BLUE GREEN RED hex codes
color_foreground=FFFFFF color_foreground=ffffff
# BBGGRR - BLUE GREEN RED hex code color_foreground_text=000000
color_background=000000 color_background=000000
color_background_text=ffffff
# hide proximity based elements when mpv autohides the cursor # hide proximity based elements when mpv autohides the cursor
autohide=no autohide=no
# display window title (filename) in top window controls bar in no-border mode
title=no
# `chapter_ranges` lets you transform chapter indicators into range indicators # `chapter_ranges` lets you transform chapter indicators into range indicators
# with custom color and opacity by creating a chapter range definition that # with custom color and opacity by creating a chapter range definition that

868
uosc.lua

File diff suppressed because it is too large Load Diff