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
BlackBerry Development Advisor
Posts: 683
Registered: ‎11-29-2011
My Device: PRIV
My Carrier: Rogers

Re: MediaPlayer object on 10.1

there's a purely native mm-renderer sample here:

https://github.com/blackberry/NDK-Samples/blob/master/VideoPlayback/main.c

integrating with cascades likely requires the use of a ForeignWindowControl.

Doable, but I don't see existing samples in the 2 repos I just checked.

 

It's odd that the cascades media player doesn't work for you, since it is built on top of mm-renderer as far as I know.

 

Cheers,

Sean

 

Regular Contributor
Posts: 77
Registered: ‎06-02-2012
My Device: Playbook, BB10
My Carrier: Orange

Re: MediaPlayer object on 10.1

@smcveigh I'm not sure, but I don't think I can use the ForeignWindowControl in webworks extension. I develop HTML5 apps, not Cascades.

 

And no, "http://76.73.4.30:80/;" or any other type of stream didn't work using MediaPlayer. I tried every way I know. The stranger thing is that the mp3 urls posted in this thread worked fine in the browser, but MediaPlayer object doesn't play them, it just crashes the whole app after a few seconds..

 

 

BlackBerry Development Advisor
Posts: 683
Registered: ‎11-29-2011
My Device: PRIV
My Carrier: Rogers

Re: MediaPlayer object on 10.1

oh, this is webworks.  thorught you were in Cascades for some reason.  Is MediaPlayer a WebWorks component?

Can you provide a code snippet?  Will forward the bug to the appropriate folks.

Regular Contributor
Posts: 77
Registered: ‎06-02-2012
My Device: Playbook, BB10
My Carrier: Orange

Re: MediaPlayer object on 10.1

I sent you a direct message with the code snippet, explaining everything in more detail.

Thanks!

Highlighted
New Contributor
Posts: 9
Registered: ‎04-25-2013
My Device: Z10
My Carrier: Rogers

Re: MediaPlayer object on 10.1

FYI:

 

I download the NowPlaying App from Cascades sample repo:

http://developer.blackberry.com/cascades/sampleapps/

 

Next, I changed the following like in main.qml file:

 

/* sourceUrl: "music/song.mp3" */
sourceUrl: "http://76.73.4.30/;"

 

I deplyed the app to my Z10 and the radio station plays fine once I press the big play button.

 

Regular Contributor
Posts: 77
Registered: ‎06-02-2012
My Device: Playbook, BB10
My Carrier: Orange

Re: MediaPlayer object on 10.1

I didn't think to try a pure cascades example. But you are right, it works fine with that example, both AAC and MP3 streams, shoutcast version 1.9.8 on 10.1 Dev Alpha C and Dev Alpha A.

Then there are few causes why it might not work with my code:

- something changed in the way native webworks extensions work between 10.0 and 10.1

- different MediaPlayer implementations between Cascades and C++ ? (not very likely)

- my code is broken somewhere else,  but only broken on 10.1

 

Thanks a lot for your help and inside knowledge Smiley Happy