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

Native Development

Reply
Developer
hemant_sain
Posts: 179
Registered: ‎12-09-2011
My Device: 9360, BB10
My Carrier: Aircel

Play video/audio from Http url with authentication headers

Hi All,

            We are building an app which requires us to play audios and videos from a http URL. We spent time to understand the mm_renderer API and wrote a code that is able to play videos and audios from the device. For the videos to be played from the HTTP source we need to send some authentication headers. Can anyone guide us on how to do that with any of these functions:-

 

mmr_input_attach()

mmr_input_parameters()

mmr_connection_t

mmr_context_parameters().

 

Any link with the documentation on what all input, context and connection parameters could be set is also not available on the internet. Any kind of documentation on this would also help.

 

This is a very critical issue for our team.

Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: Play video/audio from Http url with authentication headers

Hi,

 

I think mmr_context_parameters is what you're after.

 

https://developer.blackberry.com/native/reference/core/com.qnx.doc.mme.mmrenderer.lib_ref/topic/mmr_... shows cURL options;

  • OPT_HTTPAUTH
  • OPT_HTTPHEADER

Has your code attempted any values? What error results are you seeing?

 

Thank you.

--
Rob is no longer associated with BlackBerry.
Please use plain text.
Developer
hemant_sain
Posts: 179
Registered: ‎12-09-2011
My Device: 9360, BB10
My Carrier: Aircel

Re: Play video/audio from Http url with authentication headers

Hi robbie,

                   I'm confused on how to provide headers to the mm_context_parameters() method as the argument which is a strm_dict type key value pair. The key corresponding to it would be OPT_HTTPHEADER but will the value be a QMap of all the headers that we have to set?

 

Also when we are trying to embed this mm_renderer API in a cascade project it keeps giving context is null error. Is this possible for a Cascades project to have mm_context object.

 

Thanks 

Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: Play video/audio from Http url with authentication headers

Hi,

 

Can you create a minimal sample?

 

Thanks

--
Rob is no longer associated with BlackBerry.
Please use plain text.