How can I modify a Howl object while a song is playing? #1585
Unanswered
trevorwrightdev
asked this question in
Q&A
Replies: 1 comment
-
good |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, the main thing I want to accomplish is to make it so the user can determine if they want a song to loop while that song is playing. I'm storing my Howl object as a state. I am just wondering what would be the best way to accomplish this. Here is my initialization of the Howl object:


Here is the code I have been using to change the state of the song:
This will essentially do nothing when I test it out. I would prefer to do something like music.loop(true) but I can't seem to do that if I am using useState. How would a normal person modify the Howl object mid song?
Beta Was this translation helpful? Give feedback.
All reactions