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
wmatt
Posts: 125
Registered: ‎10-02-2011
My Device: Playbook
My Carrier: none
Accepted Solution

Open files in native media player

Is there a way to open an audio or video file in the native media player? Or do I need to write an extension?

Please use plain text.
BlackBerry Development Advisor
bryanhiggins
Posts: 187
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3
My Carrier: Bell

Re: Open files in native media player

Hi,

 

You can use blackberry.invoke.invoke, or we've also wrapped it in a convienience API:

 

https://developer.blackberry.com/html5/apis/blackberry.invoke.card.html#.invokeMediaPlayer

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Please use plain text.
Developer
wmatt
Posts: 125
Registered: ‎10-02-2011
My Device: Playbook
My Carrier: none

Re: Open files in native media player

[ Edited ]

Can the player use a remote image? This successfully plays an mp3 and shows the title, but the image isn't displayed:

 

blackberry.invoke.card.invokeMediaPlayer({imageUri:"http://media.npr.org/assets/img/2012/10/18/npr_line_logo_custom-259bacf75768725fa3a2d9c42f1a1faedc4c...

 

Please use plain text.