02-07-2012 04:25 PM
Just spent a few hours downloading and setting up smartphone (version 7) simulators and PlayBook simulator with VMWare.
DOwnloaded KitchenSink app showcasing html5 webworks - built this and ran on PB and BB (.cod and .bar files) deployed, after several attempts.
However, I cannot find a way to play a sound file (mp3, wav or anything else) in Ripple, simulator or real devices.
This is the last thing I need to do to get my mini app working on pb.
02-07-2012 04:36 PM
02-07-2012 08:17 PM
I put test code/sample in when answering http://supportforums.blackberry.com/t5/Web-and-Web
02-08-2012 10:42 AM
The simplest way I've found is to set up the HTML5 audio tag:
<audio preload="auto" autobuffer id="audio"> <source src="audio/1.wav"> </audio>
Then put this in any HTML tag (a, img, div, etc.):
This will pre-buffer the audio file with no controls, and then clicking your link, image, whatever will start it playing. There is also a .pause() function to stop playback if that's required.
03-19-2012 03:36 PM
Unfortunately no, HTML5 audio currently supports single audio channel on PlayBook. If you start playing a second audio file, you can expect the first to be stopped. The BrowserDev team is working on expanding this (no ETA).
Understand that single channel audio restricts ability to provide certain features (e.g. background music + foreground sound effects), however it is what it is today, but will improve with a future build.
Flash does allow you to play multiple audio files, and we have an extension published as part of a WebGL-sample. You can see and download the code here if interested to enable this capability in your WebWOrks apps:
03-28-2012 10:36 PM
03-28-2012 10:50 PM
On second thought.... .I just tested the tunneltilt app in Ripple and that doesn't work either. I guess Ripple is still somewhat limited