04-22-2011 04:17 AM
I'm using this code to play some sounds on the playbook simulator (SDK 2.0)
var paintAudio=new Audio("arpa3.mp3");
The audio plays but in loop mode (automatically starts playing again when it finishes).
Do you know how to override this behaviour?
Additionally, when I play a sound while another sound was playing, the first sound stops. Is only possible to run one sound at a time?
Solved! Go to Solution.
04-22-2011 11:36 AM
the audio element has a "loop" property that you can change from true to false:
paintAudio.loop = false;
Regarding your second question about syncronization, are you running your content on a simulator or live device? The simulator is not able to reproduce the multi-threaded behavior of the live PlayBook device - so you get one event stopping and the other starting.
06-02-2012 05:13 PM
I've not multithread behavior playing sound in my PB
My HTML5 app plays sound in loop mode and another sounds at he same time when i testing in mi PC with my chrome browser, but when i deploy to my PB, the loop sound stops when another sound begin playing
Thanks in advance
06-06-2012 10:49 AM
Its because PlayBook currently only supports 1 active channel for HTML5 audio, while Chrome has a different implementation.
The latest PlayBook Tablet OS v2.1 developer BETA has this feature improved. If you upgrade your device, you will see that you can play multiple audio streams on the same page: