BlackBerryで10秒の長さのビデオを再生したい。ビデオの再生が完了したら、別の画面に移動します。このために、プレーヤーの現在のステータス(たとえば、再生、停止、一時停止など)を知りたいです。
これが私が今使っているコードです。この問題についてサポートが必要です。
InputStream is = getClass().getResourceAsStream("/video/battery_tip.mp4");
player = Manager.createPlayer(is, "video/mp4");
player.prefetch();
player.realize();
VideoControl vc = (VideoControl) player.getControl("VideoControl");
Field fld = (Field) vc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
vc.setDisplayFullScreen(true);
vc.setVisible(true);
add(fld);
player.start();