alexanderwallin / react-player-controls

⏯ Dumb and (re)useful React components for media players.
http://alexanderwallin.github.io/react-player-controls/
ISC License
191 stars 35 forks source link

ProgressBar events not firing #42

Closed unleashit closed 6 years ago

unleashit commented 6 years ago

Can't seem to get the progress bar events to fire. Here's an example on CodeSandbox:

https://codesandbox.io/s/2v3wyv6m0r

I have each of the events logging to the console, but clicking the handle doesn't trigger them (except sometimes onSeekEnd when the component first mounts for some reason...). I'm not expecting it to move since the position is hard coded, but I would expect the events to trigger. Am I missing something?

The other widgets seems to be working as excepted.

Thanks!

unleashit commented 6 years ago

Actually, it was CSS related. I'd copied all the styles from the demo site, but missed adding position: absolute to the RangeControlOverlay div. Without that the clickable area wasn't occupying the right space.

Thank you very much for the library, it's nice start for someone who hasn't yet built media controls. But for the love of Crom maybe add some CSS. Even a simple compiled CSS file would be a big help. The same CSS you're using in the demo would work a charm, maybe with a disclaimer that it's there only for basic reference.

alexanderwallin commented 6 years ago

I'm glad you managed to solve it. And that you've had good use of it all!

Yeah, people should not have to bother with styling something as fuzzy as <RangeControlOverlay />. There is a revamp going on in the composition branch that will onboard people in a better way, as well as make all controls more easily customisable.

Thanks for reporting!