Languages

Menu
Sites
Language
api to play audio content (volume, balance)

Hi,
What Tizen api should I use to play locally stored audio contenet for Web apps
I guess there are AudioContext and webkitAudioContext, what is preferrable?
Especially interesting how to manage sound volume and balance.
Alexey.

Responses

4 Replies
Lakshmi Grandhi

Hi,

 

You can directly use Audio element to play the audio files, if you want to record any audio file, webkitAudioContext is recommanded.

Sergey
var audioElement = document.createElement('audio');
var uri = "path to audio file";

audioElement.setAttribute('src', uri);
audioElement.load();
audioElement.play();
//audioElement.pause();

 

Alex Dem

Thank you for responses!

Alexey.

Alexander AVSukhov

Hello,

For manage volume you can use hybrid app, please refer following article:

https://developer.tizen.org/ru/documentation/articles/message-port?langredirect=1