Using the Mobile Media API, how do you play a video?
Created May 8, 2012
John Zukowski This is similar to playing an audio file but requires you to get the control to display the video on. You need to see the results, not just hear them.
InputStream is = getClass().getResourceAsStream("/example.3gp"); Player player = Manager.createPlayer(is, "video/3gpp"); player.realize(); VideoControl vc = (VideoControl)player.getControl("VideoControl"); if (vc != null) { Item it = (Item)vc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null); aForm.append(it); player.start(); }