Fork me on GitHub

anyone worked with html5 audio in fulcro? trying to figure out how a property in app-state can affect the playback of an audio object (play, pause etc), and where to actually place the Audio object since app-state and component local state sounds like a bad idea. pointers appreciated.


@ianchow So, I would consider the fact that the audio player has it’s own state, and you should treat that as the “store” of that state, not duplicate it.


Interfacing with the stateful world means you’ve just got some external state to deal with. If you need the UI to respond to that state, then hook event handlers to the change events that come from the components and transact against the reconciler to update your UI state to match.


@ianchow yes, in Dave Conservatoire there are plenty usages of Audio API, you can look up in the project usages for this namespace: