语言

Menu
Sites
Language
Problem with more than one sounds in Tizen

I am facing very serious issue at that time which is that i have multiple pages and each page have five sound . Now when i play all the sound of each page then after constantly playing sounds on page 8 or seven even if i play again and again sounds of first page next page sounds will not work and my all application will be in state of "not responding" . I do not see any crash report or error that what thing cause that behaviour. Any help will be appricited.
 

Here is my code:

 

var audioElement = document.createElement('audio');

function audio(audio_name) {
Disable();
audioElement = document.createElement('audio');
audioElement.setAttribute('src', 'audio/' + audio_name + '.ogg');
audioElement.load();
audioElement.play();

}
function Disable() {
audioElement.duration=0;
audioElement.pause();

}

 

 

From this link you can also have a look that before some sounds were working and some others not for this i choose that solution

 

https://developer.tizen.org/forums/web-application-development/sounds-are-not-being-played

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

4 回复
Lakshmi Grandhi
Hi Noureen, I tested the application with above code, for me only one music file is audible at a time, if i click second button, first songs is not audible only second songs is audible. But you stated that all audio files will audible, is that correct.
Noureen Akhter
I have five buttons on one page and each button have onClick function and on Click a function will will be called that takes variable from each button and this word will show which sound will be play. Now when i first time i click on any button sound will be played now sounds duration are lengthy . For user convince if he/she not to want hear full sound there i call pause on audioElement so if i click on another sound if first sound is being playing the the second sound will be stop and second will be played. and yes one music willbe audible at a time.
Noureen Akhter
Sorry first sound will be stop and second sound will be played
Lakshmi Grandhi
Hi Noureen, I guess it might me performance issue, since you are playing audio's in eight pages, kindly post bug in jira with your sample application to reproduce issue.