Hi all
I'm trying to play a video file in my nokia 6303classic, but i am getting the below mentioned error
"javax.microedition.media.MediaException: Invalid locator: /res/9876543210.3gpp"
i checked the formats supported by my phone and from that i was able to know tha it supports "3gpp"
Please help me in resolving this issue
below is the code which i used to play the video file.
Code:try{ //myPlayer=Manager.createPlayer(getClass().getResourceAsStream("file://localhost/E:/Video Enrollment/"+mobNo+".3gp"), "video/3gpp"); //myPlayer=Manager.createPlayer("file://localhost/E:/Video Enrollment/"+mobNo+".3gpp"); myPlayer=Manager.createPlayer("/res/9876543210.3gpp"); myPlayer.addPlayerListener(this); //myPlayer.setLoopCount(-1); myPlayer.prefetch(); myPlayer.realize(); videoControl = (VideoControl)myPlayer.getControl("VideoControl"); if (videoControl != null) { videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this); videoControl.setDisplaySize(getWidth(),getHeight()); videoControl.setDisplayLocation(0,0); videoControl.setVisible(true); } myPlayer.start(); }catch(Exception e){ Display.getDisplay(midlet).setCurrent(new Alert("",e.toString(),null,AlertType.INFO)); e.printStackTrace(); }

Reply With Quote



