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
New Contributor
Posts: 4
Registered: ‎10-17-2012
My Device: BB Dev Alpha
My Carrier: Fido

Blackberry Webworks - Accessing System Audio

Hello Everyone, I am trying to write a dashboard application for the playbook, dev alpha and BB10. I have some of the functionality in which I want but I am having trouble access thing device audio.

 

I am not trying to use HTML5 to play audio, but rather grab the currently playing audio on the Playbook.

 

I want my application to be able to see what's playing, control what's playing (play/pause next/prev, volume)  and if possible access the id3 tags.

 

I have looked through the APIs,

 

https://developer.blackberry.com/html5/apis/blackberry.audio.html

https://developer.blackberry.com/html5/apis/blackberry.audio.player.html

 

And loaded the "Kitchen Sink" App onto the device and not been able to accomplish this or find a jumping off point for what I want to accomplish. 

 

One thing I found odd is that in the Apis listed above it doesn't list Playbook or BB10 but does list Ripple?

 

 

Any insight, links or help would be awesome! Thanks!

 

 

 

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Blackberry Webworks - Accessing System Audio

For PlayBook, you will have to use HTML5 audio.  The blackberry.audio APIs are Java based and are available for the Smartphone platform only (BlackBerry 5 - 7).  Since the Java runtime is not present on the PlayBook, those APIs are not supported.

 

The reason why you see them 'work' in Ripple is because Ripple is an emulator, and under the covers, is mapping those JavaScript objects to HTML5 audio. Its the magic of being an emulator: provide the application with the interface it needs, but implement it under the covers in however way best supports the need for the sake of testing.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
Posts: 4
Registered: ‎10-17-2012
My Device: BB Dev Alpha
My Carrier: Fido

Re: Blackberry Webworks - Accessing System Audio

Hi astanley, Thanks for the answer, I appreciate it.

 

Just to follow up, do you know if those apis will be supported at some point?

 

One other question, I saw how audio files can be played through HTML5. While I haven't played with this extensively yet, is there a way to read/have access to the device's playlists/files from within the application?

 

Such as using https://developer.blackberry.com/html5/apis/directoryreader.html with the https://developer.blackberry.com/html5/apis/filereader.html to ssentially generate a list of files and make a player or are the applications sandboxed?

 

Thanks again! 

 

Bren1818