Ask questionsExtend add url and load/save list by the user

Hey @captbaritone how are you?

Could be possible to add support to define custom callbacks for the open/save playlist? In that way we can let to the developer defines custom behavior for these operations.

I was thinking something like:

const webamp = new Webamp({
  handleAddUrlEvent: (e) => {
  handleLoadListEvent: (e) => {
  handleSaveListEvent: (e) => {

Awesome project btw! It's a time machine to my youth


Answer questions captbaritone

I think the closest parallel would be the handleTrackDropEvent option. Here's how that works:

  1. It's passed into the Webamp as an option and passed to the Redux store (here) as part of the extras. This makes the value available inside of the Redux Thunks.
  2. Then you'll need to create an action creator(s) like this one which responds to the user's action by calling the new function if provided, and falling back to calling alert() if it's not.
  3. Finally, inside the component, you'll need to dispatch the action you created. You can do this using useActionCreator, which already has an example in the file.

If you have any questions, feel free to ask here, or jump into our Discord (mentioned in the Readme).

Thanks again for the suggestion and your willingness to help.


Related questions

No questions were found.
Github User Rank List