Hi! Happy New Year!
Please, help me to create play/pause button for background sound which is played on the page load. I tried to use pre-built actions play and stop sound but when I press the button with stop sound action the sound stops and when I press it again, sound starts from the beginning. I need the sound continues from the stop moment (pause action).
So I tried just_audio package and created custom actions. I created play sound action and pause action, but there is error that my player is not defined then I try to compile. But I defined the player in the "playSound" action.
Have you idea how to realise the functionality using these custom actions or maybe there is another way to do that?
Play Sound Action
Pause Sound Action
Error: