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
Contributor
caneraltinbasak
Posts: 30
Registered: ‎01-22-2011
My Device: Playbook
Accepted Solution

Playbook webworks audio player.

I am trying to play audio from local file system and stream audio internet. 

 

I tried blackberry.audio.Player method explained in webworks api documentation. I guess playbook does not have this object installed, because as far as I can see I am getting an exception because of an access to uninitialized object.

 

Secondly, I tried jplayer, which uses html5 audio player if html5 extensions are available, and falls back to adobe flash player if html5 does not succeed. It was still not successful...

 

Thirdly, I have tried pure html5 player. I can see the controls, the audio length is shown with "-" value? (I didn't understand why?) but no audio. 

 

I tried the second and third method in google chrome, it works. Do you have any idea what might be wrong? What is the recommended method for playin audio?

Please use plain text.
Contributor
caneraltinbasak
Posts: 30
Registered: ‎01-22-2011
My Device: Playbook

Re: Playbook webworks audio player.

By the way, 

The default web browser on playbook(0.94) crashes with the demo of jplayer:

http://www.jplayer.org/latest/demo-01/

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Playbook webworks audio player.

Hi there,

 

There have been a few threads around this topic on the forums.  The blackberry.audio API is only on the smartphone platform.. The PlayBook WebWorks APIs can be found here:

 

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

 

Audio not playing in the simulator is a known issue.  The 0.9.4 simulator does not come with any codecs to be able to play audio or video.  This will be corrected in the final RTM version of the simulator.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Regular Contributor
abhishek_puppalwar
Posts: 69
Registered: ‎01-17-2010
My Device: 9700 Bold
My Carrier: Airtel

Re: Playbook webworks audio player.

well i tried the audio player API for smartphones, found that the local file kept in res/files folder does not play on smartphones. The length of the audio file is 559 kb. but when i replaced the same file with another of length 57 bytes, it successfully played on device. Can you please help me playing the first file?
AbhishekPXP
Please use plain text.
New Developer
Bhaal29
Posts: 20
Registered: ‎11-30-2012
My Device: curve 8520
My Carrier: TME

Re: Playbook webworks audio player.

I want to ask you if the Playbook simulator does actually have audio support, I can´t make it work

 

Thanks in advance for your help

Please use plain text.