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

Java Development

Reply
New Developer
pavlikus
Posts: 3
Registered: ‎07-22-2008
My Device: Not Specified

javax.microedition.media.Player, issues on 4.2 platform

Hi all,

 

It's on 4.2 platform... I use javax.microedition.media.Player thing for displaying video content in my application. It worked pretty well until I need to implement video pausing and seeking. When I use player.stop() method then the video playback gets dissapeared and I see the screen that was under it. Though it becomes visible back when I resume the playback using player.resume()

 

Almost the same thing happens when I seek the playback back and forward - the playback dissapears for a moment, gets seeked and then appears back at the new play position.

 

Is there chance to make the seeking smooth and pause do not hide the video?

 

Thank you!

Pavlo 

 

 

 

 

BlackBerry Development Advisor
MSohm
Posts: 14,757
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: javax.microedition.media.Player, issues on 4.2 platform

Have you created a MIDlet or BlackBerry CLDC application?  Can you provide some sample code of your implementation?  What is the full 4 digit BlackBerry handheld software version you are testing on?  You can find this under Options, About on the BlackBerry.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Developer
rab
Posts: 283
Registered: ‎07-22-2008
My Device: Not Specified

Re: javax.microedition.media.Player, issues on 4.2 platform

I am getting the same behavior. Basically when the player is not playing, it does not refresh the screen.

This is how it was always behaving on all devices ( version 4.2.x).

Is this a bug?

 

 

Rab

BlackBerry Development Advisor
MSohm
Posts: 14,757
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: javax.microedition.media.Player, issues on 4.2 platform

If you are using a MIDlet, are you using a Canvas?  Or are you using a BlackBerry CLDC application?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Developer
rab
Posts: 283
Registered: ‎07-22-2008
My Device: Not Specified

Re: javax.microedition.media.Player, issues on 4.2 platform

I am using a BlackBerry CLDC application.

 

 

Rab

New Developer
pavlikus
Posts: 3
Registered: ‎07-22-2008
My Device: Not Specified

Re: javax.microedition.media.Player, issues on 4.2 platform

Hi MSohm,

 

It's CLDC application. Here's how I create and prepare the player:

 

player = Manager.createPlayer(Utils.filePath(track.getFilename()));

player.addPlayerListener(new PlayerListener() {

    public void playerUpdate(final Player player, String event, Object eventData) {

        if (event == PlayerListener.END_OF_MEDIA) {

            ...

        }

        if (event == PlayerListener.STARTED) {

            ...

        }

    }

});

player.realize();

player.prefetch();

player.start(); 

 

For pause/resume things I am using player.pause() and player.start() methods. I tried them with and without screen invalidation - both does not work smoothly.

 

As for seek - I am using player.setMediaTime(long) method call (tried also to do screen invalidation right after it)

 

it's 4.2.2.123 BlackBerry handheld software version.

 

 

 

Retired
bzubert
Posts: 86
Registered: ‎07-11-2008
My Device: Not Specified

Re: javax.microedition.media.Player, issues on 4.2 platform

[ Edited ]

If you embed the Player within your Canvas, the paused screen will remain.  To embed your media player in your Canvas, call VideoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, _myCanvas). 

 

For those extending the RIM UI, similar functionality is available in 4.3.0, where you would call 

videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field" ) , and then add the returned Field to your Screen.
Message Edited by bzubert on 07-23-2008 09:36 AM
Brian Zubert
Technical Partnership Manager
Research In Motion