Timeline ranges such as uncached indicators or chapter ranges were treating line as if it's infinitely thin line located at `time_x`. This lead to ranges overlapping progress line even though the current time hasn't reached their start time, or went past their end time yet. This was confusing.
The new behavior essentially makes line push all of the x coordinates of timeline ranges apart, never allowing any to lie inside it. In other words, it's as if the line cuts timeline in half, and squeezes itself in between.
- Volume hides when timeline is hovered to not render over thumbnail.
- Progress line starts growing only at the end of minimization.
- Buffered time is bottom capped to 0.
Fixed:
- tooltip for adjacent sponsor block segment was not showing because last previous chapter belonged to end of the previous segment
- overlapping chapter range backgrounds in timeline
The `shuffle` option built into mpv doesn't shuffle playlist playback, but instead just randomizes the order of every new opened playlist. So when you enable this after opening a playlist, it does nothing. If you enable it before opening a playlist, it'll randomize its list order, so you can't browse alphabetically. None wants this, none expects this. And since its is expected from a ui such as uosc to provide a shuffle button that works like in any other media player on the planet, I had to simulate it.
It decides on the next file 300ms before the end, so it can potentially cut out punchlines from short videos such as those from r/perfectlycutscreams. But this is necessary because a lot of files actually end like ~100ms or more before their duration, but on corrupted files or files where stream ended prematurely, this can happen way before that. If file is force ended by mpv before our timer kicks in, our simulated `file-end` event won't fire, and uosc is unable to take over to decide to play the next one.
I couldn't figure out a better way to implement this. There's no 'fil-reached-end' even in mpv. There are only 'im-unloading-the-file' events (`file-end`, `on_unload`, ... etc), which is useless here because it triggers even when user opens a different file during playback.
Implementing `shuffle` allowed for trivial `next_file_on_end`, so that got added as well. It load next file in directory when current file ends.
Directory navigation now also adheres to `shuffle` uosc option, and `playlist-loop`, `playlist-repeat`, & `loop-file` mpv options.
Additionally, the `<has_playlist>` disposition was removed from the `shuffle` and `loop-playlist` control bar buttons as they now affect directory navigation as well.
closes#235
Users can no longer create their own or edit existing chapter range serializers, but that was always very limited and prone to errors. Instead, all common use cases for chapter ranges: intros/openings, outros/endings, and sponsor blocks serializers are now internal.
Users can still disable and configure colors for each individual serializer by specifying a `{type}:{color}` pairs delimited by a comma on a `chapter_ranges` property. The color is now an RGB(A) HEX code.
* fix: anchor texture instead of align and shift
* fix: texture offset for timeline and volume
The black lines are now nicely centered between the white ones.