I have and htmol page in which i have six button . Each button have onVlivk function activated and onClick a sound will be played. Sounds are in mp3 format. Now i when i click on any button sound will be played but if i click on another button in between of sound then the recently clicked button will not polayed sound. Means if there is click in between of sound duration other sound will not be played. Now after this if i click on any button sound will not be played. \
Sounds are not being Played
I have and htmol page in which i have six button . Each button have onVlivk function activated and onClick a sound will be played. Sounds are in mp3 format. Now i when i click on any button sound will be played but if i click on another button in between of sound then the recently clicked button will not polayed sound. Means if there is click in between of sound duration other sound will not be played. Now after this if i click on any button sound will not be played. \
Whats the problem i am unable to understand.
Here is my code.
<button class=”stage1″ style=”width: 280px;height: 130px; margin-top: 40px;margin-left: 40px; background: transparent; “onclick=”audio(‘a’)” ></button>
In Javascript:
function audio(audio_name) {
audioElement.setAttribute(‘src’, ‘audio/’ + audio_name + ‘.mp3’);
audioElement.play();
}
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio