THEOplayer / web-ui

UI component library for the THEOplayer Web SDK
https://www.theoplayer.com/docs/open-video-ui/web/
MIT License
10 stars 0 forks source link

Add React utility hooks #51

Closed MattiasBuelens closed 7 months ago

MattiasBuelens commented 7 months ago

This adds hooks such as useCurrentTime(), usePaused() and useVolume(), to easily access the player's state from within a custom React component.

I also reworked our internals to avoid useEffect() as much as possible, using the techniques from You Might Not Need an Effect.