语言

Menu
Sites
Language
Play Music in background when navigating

Hi

How can I play a music continuously in background when navigating in my app.

thanks.

响应

6 回复
daniel kim

Hi,

This link has good information about web audio api to play the background music. so I suggest you to visit here.

   http://www.html5rocks.com/en/tutorials/webaudio/games/?redirect_from_locale=ko#toc-bg 

I wish this will help you.

 

AVSukhov
Hello,

You can try to use Web Audio API:

https://developer.tizen.org/dev-guide/web/2.3.0/org.tizen.mobile.web.appprogramming/html/guide/w3c_guide/media_guide/web_audio.htm

https://developer.tizen.org/documentation/articles/working-web-audio-api

https://developer.tizen.org/documentation/articles/advanced-web-audio-api-usage

 

Ahmed Arfaoui

Hi,

Thank you for your quick reply.

when i downloaded the sample from https://developer.tizen.org/documentation/articles/working-web-audio-api it shows me an error when lunching

 

Error code: PRIVILEGE_LEVEL_VIOLATION
Error message: 
Command: /usr/bin/pkgcmd -i -q -t wgt -p "/opt/usr/apps/tmp/SoundPlayer.wgt"
Management: Refer to Help contents > Getting Started with Tizen > Overview > Privilege.


Error code: PRIVILEGE_LEVEL_VIOLATION
Error message: 
Command: /usr/bin/pkgcmd -i -q -t wgt -p "/opt/usr/apps/tmp/SoundPlayer.wgt"
Management: Refer to Help contents > Getting Started with Tizen > Overview > Privilege.

"

what can i do to fix this issue. 

Thanks

Alex Dem

Hi,
This sample app has been developed for Tizen 2.2.1.
As minimum, in config.xml it uses

<tizen:privilege name="http://tizen.org/privilege/systeminfo"/>


which was replaced in 2.3.0 with

<tizen:privilege name="http://tizen.org/privilege/system"/>


Also the sample app uses  

<tizen:privilege name="http://tizen.org/privilege/tizen"/>


which is deprecated.
But i suppose there could be another problems
Also better to add  

<tizen:profile name="mobile"/>

in config.xml.
Alexey.

Ahmed Arfaoui

Thank You For Your reply , i changed the privileges , i can open the sample now , but no sound is playing. 

any idea please ?

Thank you

Ahmed Arfaoui

Hi, I run the sample on simulator, i inspected the element , and it shows me this error

" Uncaught TypeError: _context.createGainNode is not a function "

 

Screenshot