Hi all,

I'm trying to run the following code, however its gives me nothing. Other than the video, everything's running fine. Please check through the code if you find anything going wrong.


else if (c == Demo)
{

form1.deleteAll();
form1.setTitle("Demo Video");
form1.removeCommand(Next1);
form1.removeCommand(Exit);


playFromResource();



}


public void playFromResource()

{

try

{

InputStream in = getClass().getResourceAsStream("/Video/Hitesh.mpeg");
if (in != null)
{
mPlayer = Manager.createPlayer(in, "video/mpeg");
}else
{
alert = new Alert("Alert", "No video", null, null);
display.setCurrent(alert);
return;

}
mPlayer.prefetch();

mPlayer.realize();
if((mVidc = (VideoControl)mPlayer.getControl("VideoControl"))!=null)

{

mVideoItem = (Item)mVidc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null);
form1.append(mVideoItem);
}

mPlayer.prefetch();
mPlayer.start();
// form1.removeCommand(mPlayCommand);
display.setCurrent(form1);


}
catch (Exception e)

{e.printStackTrace();}

}

waiting for response.