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

Posts: 207
Registered: ‎02-10-2011
My Device: Playbook 16GB and Z10
My Carrier: Verizon

MediaPlayer Bug?

So I have been doing some debugging and I have an app where I stream music.  When 15% of the song has downloaded, I pass the media player the file path and tell it to start playing.  This works wonderfully as I am writing to the same file it reads from.  But the issue appears when I recently implemented having a seek bar, I put all the appropriate error handling to keep a user from trying to seek to a position that isn't downloaded yet, but when the song is completely downloaded, it won't seek past its 15%.  My guess is that the media player gets an idea of how long the song is before it starts playing and when I try to seek to a position that now exists since the song started playing, but doesn't exist according to its starting value it doesn't understand how to seek there, even though it will read the song all the way through no problem.


To figure out that this is in fact the issue I did the following:


I changed this:


MediaError::Type error = player->seekTime((int)position);

 To this:


MediaError::Type error = player->seekTime((int)position);

 And it works as expected.


Should I report this anywhere?!

Go Music
Flashlight Fast Free/Pro
Fitbit for BlackBerry PlayBook