react-color-extractor icon indicating copy to clipboard operation
react-color-extractor copied to clipboard

maxColors does not limit the number of colors

Open WhereCanI opened this issue 2 years ago • 0 comments

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.

WhereCanI avatar Jun 22 '23 09:06 WhereCanI

@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.

karthink avatar Apr 25 '23 23:04 karthink

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)

ParetoOptimalDev avatar Apr 26 '23 07:04 ParetoOptimalDev

https://github.com/torque/mpv-progressbar apparently also does this behavior and guesses at progress and gives some sort of feedback based on bitrate.

ParetoOptimalDev avatar Apr 26 '23 08:04 ParetoOptimalDev

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-state is unavailable
  • It stays that way until the video loads
  • the video loads and cache-buffering-state value becomes 100 immediately

ParetoOptimalDev avatar Apr 26 '23 14:04 ParetoOptimalDev

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:

ParetoOptimalDev avatar Apr 28 '23 01:04 ParetoOptimalDev

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?

karthink avatar May 03 '23 22:05 karthink