Skip to main content

MediaComponent issue

6 replies [Last post]
damkea
Offline
Joined: 2008-07-22
Points: 0

Hi all,

I'm developing an application, that uses the MediaComponent for playing videos. It works well (the video is playing), but the problem is that the panel where the commands are displayed is just grey (dont know if it is indeed the panel or the mediacomponent). No commands are displayed (no theme as well).

The problem occurs when I add the mediacomponent to a form (BorderLayout.Center). When I left out the mediacomponent it is just fine.

How can I remove this grey area (or show the command panel)?

Thx for the replies!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lironhel
Offline
Joined: 2008-08-25
Points: 0

Hi,

This is an Emulator problem.

To over come this issue you need to call
[Canvas].setFullScreenMode(false);
[Canvas].setFullScreenMode(true);

first False and then True - this is the way to remove this grey area

The problem is that the LWUIT did not open this function for you!!!!
so, or you wait for them to open this OR over come this localy OR leave it like this since its only Emulator!!! issue :)

Cheers

damkea
Offline
Joined: 2008-07-22
Points: 0

Ok, I used my old Nokia N70 for testing (had some problems with PDA) and I don't get the grey area anymore. Think it's the emulator causes the grey area to appear.

Thx for the replies ;)

Francis De Brabandere

Are you using a Sony Ericsson 850i? I'm having similar issues on that
phone (+ other media player issue on the 660i).

On Tue, Jul 22, 2008 at 7:15 PM, wrote:
> Hi all,
>
> I'm developing an application, that uses the MediaComponent for playing videos. It works well (the video is playing), but the problem is that the panel where the commands are displayed is just grey (dont know if it is indeed the panel or the mediacomponent). No commands are displayed (no theme as well).
>
> The problem occurs when I add the mediacomponent to a form (BorderLayout.Center). When I left out the mediacomponent it is just fine.
>
> How can I remove this grey area (or show the command panel)?
>
> Thx for the replies!
> [Message sent by forum member 'damkea' (damkea)]
>
> http://forums.java.net/jive/thread.jspa?messageID=288481
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

--
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

damkea
Offline
Joined: 2008-07-22
Points: 0

Im using the emulators delivered with the Sun Wireless Toolkit. Maybe that's the problem. Im gonna try the application on my PDA (WM6) to see what happens.

I'll reply soon.

chen

Hi,
Can you send a snippet of the code and/or a screenshot?

Thanks,
Chen

lwuit-users@mobileandembedded.org wrote:
> Hi all,
>
> I'm developing an application, that uses the MediaComponent for playing videos. It works well (the video is playing), but the problem is that the panel where the commands are displayed is just grey (dont know if it is indeed the panel or the mediacomponent). No commands are displayed (no theme as well).
>
> The problem occurs when I add the mediacomponent to a form (BorderLayout.Center). When I left out the mediacomponent it is just fine.
>
> How can I remove this grey area (or show the command panel)?
>
> Thx for the replies!
> [Message sent by forum member 'damkea' (damkea)]
>
> http://forums.java.net/jive/thread.jspa?messageID=288481
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

damkea
Offline
Joined: 2008-07-22
Points: 0

Here is a screenshot:

http://www.accespoints.nl/images/lwuit_med.png

(the interface isn't the problem, tried it without the labels)

Here a part of the code:

Player player;
MediaComponent medComp;
String location = "/video.mpg";
String key = "video/mpeg";

InputStream file = getClass().getResourceAsStream(location);
player = Manager.createPlayer(file, key);
player.prefetch();
player.realize();
player.start();
medComp = new MediaComponent(player);

addComponent(BorderLayout.CENTER,medComp);

In reply to Francis:

Im using the emulators delivered with the Sun Wireless Toolkit. Maybe that's the problem. Im gonna try the application on my PDA (WM6) to see what happens.

I'll reply soon.