dcsimg

Using the Mobile Media API, how do you play a video?

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();
}
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.