02-16-2011 07:38 AM
I've been trying to develop a music app for the PlayBook, and I've hit a brick wall trying to get it to play any audio on the simulator.
I can't believe that none of the methods work, so I can only assume there is a limitation in the simulator. I've not found any threads that document the various limitations of the simulator, so i thought it might be a good idea to start one.
Using the Playbook Simulator v0.9.3
No Audio using HTML5 Methods
Using html5 audio tag does not seem to work properly.
<audio src="http://192.168.205.102/somemusic.mp3" controls="controls">Test</audio>
This displays the player controls, and appears to load the file as it correctly gets the track length. However, on playback no audio is heard.
Using an mp3 file in the application root works even less:
<audio src="local:///somemusic.mp3" controls="controls">Test</audio>
This displays the player controls, but does not appear to load the file at all.
(Have got: <feature id="blackberry.io.file" /> in config.xml)
No Audio using WebWorks Audio API Methods
After including the audio_api.jar in the ext directory and updating config.xml as per: http://www.blackberry.com/developers/docs/widgetap
Including the following code:
// Playing the player
var playerInstance = new blackberry.audio.Player("http://192.168.205.102/somemusic.mp3", "audio/mpeg", true);
As of yet, i have been unsuccessfull getting a flash swf file to render in the simulator in a webworks app. However I have found one forum post indicating that it is possible. So assuming that this is the case, does anyone has a bulletproof method of including flash i could use?
02-16-2011 09:27 AM
The WebWorks audio API is only available on the BlackBerry Smartphone platform and not the PlayBook.
Basically, the issues around audio and video is around codec licenseing and the ability to distribute the appropriate codes with the simulator. We are currently working through these distribution issues.
02-16-2011 12:23 PM
Thanks for the clarifications.
It will be very helpful when you get the licencing issue sorted.
As for the Api that is for the phone but not for the playbook, is that the case with all of the APIs listed here?
I see there is another API doc here:
Are those the only APIs avaliable on the playbook? If so it seems quite limited in comparison.
Sidenote update about the flash - I've had some success using the jquery swfobject plugin to integrate flash objects into the webworks app. Its not perfect though, seems a bit fussy.
02-17-2011 08:10 AM
So far in the beta of the WebWorks SDK on PlayBook those are the only APIs available
We will be adding more APIs leading up to the release of the PlayBook. In the end, BlackBerry Java has a lot more functionaltiy built into it than AIR. For the WebWorks SDK on PlayBook we are limited to what is exposed by the AIR platform.
03-07-2011 02:01 PM
Has there been an update to the audio support in the playbook simulator? Would no audio support effect apps consideration for the free playbook offer? Audio isn't integral to my app but it is important for alerts.
I attempted using the Audio API listed here: http://www.blackberry.com/developers/docs/widgetap
03-30-2011 09:56 PM
So are UI elements not available either? That is, can we use the WebWorks widgets that already exist? I'm thinking of things like what is demoed in the UIExamples sample app. Is there documentation on the UI elements? I've got the backend of my app written, but wanted to know if there is are BB building blocks to use to interact with the user, or if I should build my UI from the ground up. Thanks!
03-30-2011 10:26 PM
Java extensions written specifically for the BlackBerry Smartphone will not run on the PlayBook. It does not have a Java virtual machine.
The PlayBook and Smartphone are two entirely different operating systems that provide different functionality. The APIs that you can use on the PlayBook are listed here:
As the PlayBook OS functionality continues to grow, the gap between the WebWorks APIs avaialable on the two platforms will narrow and more common WebWorks APIs will appear.