Would you like to tell us how we are doing?

You bet No thanks

Sorry about the red box, but we really need you to update your browser. Read this excellent article if you're wondering why we are no longer supporting this browser version. Go to Browse Happy for browser suggestions and how to update.

Multimedia API

The Multimedia API allows you to play and record audio and video. This API is the the Mobile Media API established in JSR 135, and is provided in the javax.microedition.media package.

To record and play media in your app, use the Player class. To create an instance of a Player class, invoke createPlayer() in the javax.microedition.media.Manager class.

When the Player is first created using one of the createPlayer() methods, it is in an UNREALIZED state. Before you can have access to the associated metadata or controls for the Player, you must invoke the Player object's realize() method. This method transitions the Player to a REALIZED state.

In the REALIZED state, the Player class provides access to associated resources that control playback and recording. You can use the Player object's getControl() and getControls() methods (inherited from Controllable), passing in a String specifying the Control object that you require. You can find the available controls for your media player in the javax.microedition.media.control package.

Before your application closes, you must invoke the Player object's close() method to deallocate any resources the Player has created. You can also do this at any time to free up memory or resources. After you invoke close(), you can no longer use the Player.

More information about multimedia