react-color-extractor
react-color-extractor copied to clipboard
maxColors does not limit the number of colors
The prop called maxColors does not limit the number of colors from the element. No matter if i add 4 (as number) or 10 (as number) it is still the same 6 different colors coming out.
@ParetoOptimalDev I've pushed a lazy fix in 3842d564. By default the mpv window opens immediately. Let me know if this makes the feedback issue better or worse.
This seems to be the best one can do to get some feedback asap:
mpv --osd-level=3 --force-window=immediate https://youtu.be/DYeh7_FdmDg
Alternatively... maybe blocking until the video is ready to play, using a sentinel, and having a rotating progress bar in message area would be better?
Like:
(defun circular-progress-bar ()
"Show a circular progress bar animation."
(interactive)
(let ((bar-sequence "-\\|/"))
(cl-loop while t do
(dolist (char (string-to-list bar-sequence))
(message (format "[%c]" char))
(sleep-for 0.1)))))
(circular-progress-bar)
https://github.com/torque/mpv-progressbar apparently also does this behavior and guesses at progress and gives some sort of feedback based on bitrate.
Another thing I tried but forgot to post:
mpv --cache=yes --osd-level=3 --osd-msg3='waiting for cache: ${seeking} cache %: ${cache-buffering-state}' --force-window=immediate https://youtu.be/DYeh7_FdmDgmpv --load-stats-overlay=yes
The docs for cache-buffering-state say:
cache-buffering-state The percentage (0-100) of the cache fill status until the player will unpause (related to paused-for-cache).
So my hope was that it would immediately print number representing % of cache buffer filled. Sadly what happens is:
- When the window opens the value of
cache-buffering-stateisunavailable - It stays that way until the video loads
- the video loads and
cache-buffering-statevalue becomes 100 immediately
Also, thanks very much for the quick response. Wanted to make sure I mentioned that in case my commentary came across as anything as less than grateful :heart:
This seems to be the best one can do to get some feedback asap:
mpv --osd-level=3 --force-window=immediate https://youtu.be/DYeh7_FdmDg
From reading the man page, it looks like --force-window=immediate (as opposed to "yes") can cause other issues. Any idea what those issues are?
Alternatively... maybe blocking until the video is ready to play, using a sentinel, and having a rotating progress bar in message area would be better?
How would Emacs know when the video is ready to play?