Skip to main content

How to show video on form (LWUIT form)

4 replies [Last post]
rjounwal
Offline
Joined: 2008-07-21

Hi,
I am trying to developed an application based on LWUIT . I have some query about Video display in LWUIT
1) How will you show video on form (LWUIT form) using JSR 135 apis because, they use MIDP Form and Canavs. what is the alternative?

2)How we use other key rather then left,right,top,bottom,fire.you can use Game_Left for left keycode how we use same for other?

Thanks In advanced
rajesh

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kawaiimomo
Offline
Joined: 2008-07-10

Hi,

About question 1, check MediaComponent:
[code]
final Player mPlayer = Manager.createPlayer("capture://video");
mPlayer.realize();
final MediaComponent video=new MediaComponent(mPlayer);
[/code]

asterfr
Offline
Joined: 2008-07-17

I've a problem using your code : a content type exception, do you know what kind of videos are supported ?

kawaiimomo
Offline
Joined: 2008-07-10

I guess the Exception is being thrown when creating the player. Probably your phone doesn't support capture but playing pre-recorded media.

Take a look at what is returning [code]System.getProperty("video.snapshot.encodings")[/code] on your device. And also you would like to check [code]System.getProperty("supports.recording")[/code]

Take a look at the javadocs on your wtk install dir C:/WTK2.5.2/docs/api/jsr135/index.html it has a really nice explanation on how the API works.

Regards

asterfr
Offline
Joined: 2008-07-17

I was already trying to play media already stored on a server (non local file). Myabe my code would have help you to understand my problem :

Player mPlayer;
mPlayer = Manager.createPlayer("http://10.0.3.188/vid1.3gp");
mPlayer.realize();
final MediaComponent video = new MediaComponent(mPlayer);

this.addComponent(video);
video.start();

Sorry for misunderstanding and thanks for your help