Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 46
Registered: ‎02-16-2011
My Device: 8300>9000>9700>9900>Z10

Playbook Simulator Limitations

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/widgetapi/blackberry.audio.Player.html

    
Including the following code:

   // Playing the player
    var playerInstance = new  blackberry.audio.Player("http://192.168.205.102/somemusic.mp3", "audio/mpeg", true);    
    playerInstance.play();

This appears to break the app, Javascript is no longer processed.

 

 

Flash

 

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?

 

Cheers, Rob

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Playbook Simulator Limitations

Hi Rob,

 

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.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 46
Registered: ‎02-16-2011
My Device: 8300>9000>9700>9900>Z10

Re: Playbook Simulator Limitations

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?

http://www.blackberry.com/developers/docs/widgetapi/

 

I see there is another API doc here:

http://www.blackberry.com/developers/docs/webworks/api/playbook/

 

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.

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Playbook Simulator Limitations

So far in the beta of the WebWorks SDK on PlayBook those are the only APIs available

http://www.blackberry.com/developers/docs/webworks/api/playbook/

 

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. 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 3
Registered: ‎03-05-2011
My Device: Playbook

Re: Playbook Simulator Limitations

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/widgetapi/blackberry.audio.Player.html and had the same freezing behaviour ProfHawking described.

Kwab
Regular Visitor
Posts: 1
Registered: ‎03-19-2011
My Device: none

Re: Playbook Simulator Limitations

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!

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Playbook Simulator Limitations

Java extensions written specifically for the BlackBerry Smartphone will not run on the PlayBook. It does not have a Java virtual machine.

 

The vast majority of the UI Examples don't consist of JavaScript extensions.  I "think" there is just the Spinner control that is a JavaScript extension.

 

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:

 

http://www.blackberry.com/developers/docs/webworks/api/playbook/ 

 

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.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter