How to make an audio file play 27 times on loop and then stop?
export function playButton_click_1(event) {
$w(‘#audioPlayer1’).play();
Thank you!
How to make an audio file play 27 times on loop and then stop?
export function playButton_click_1(event) {
$w(‘#audioPlayer1’).play();
Thank you!
$w.onReady(() => {
let counter = 0;
let maxRounds = 27;
$w("#audioPlayer1").onEnded((event) => {
counter++;
if (counter < maxRounds) { $w("#audioPlayer1").play(); }
});
});
It works!!! Thank you so much!!!
I wanted to ask how to find an expert on minor improvements so as not to beg free codes on the forum. None of the WIX experts wants to do small tasks similar to this one, only a big budget projects. After I filled WIX form to find experts, no one answers. Other javascript forums - the same result.
Thank you for your help!!!
@olymp9network You’re welcome.
For minor changes like this, I believe you can do it yourself, by reading the Corvid documentation:
https://www.wix.com/corvid/reference
or searching the forum old threads.
@jonatandor35 Thanks a lot!
I spent over 2 weeks to find the solution on internet, and expert like you solved it in I believe a few minutes. I do my best to explore the js world and learn all the corvid documentation, but unfortunately it’s very strange solution to learn javascript and spend a lot of time (months) only for writing few codes that in the end I will not succeed on, instead of hiring an expert, that already have such skills…
Anyway, I’ll try to find someone, or will ask on forum.
Wix is so powerful for people without programming skills, that it’s so weird that wix “experts” are not suggesting the corvid js help, but only building a big budget sites, that you can build by yourself for free…
Thanks again for your help!
@olymp9network if you get stuck, you can always ask.
By the way, I’m not sure that my solution will work on cell phones, because some mobile browsers block automatic playing.