This is your resource to discuss support topics with your peers, and learn from each other.
Create a BlackBerry Application that uses the Player interface and the javax.microedition.media (JSR 135) package to play media.
Discover how to use the Player interface to playback video.
Discover how to use the PlayerListener interface to listen for changes to the state of the media application.
Discover how to record changes to the volume key to adjust the volume of the media application.
Download the file
In the IDE, open the multimediademo.jdw workspace
Open the MultimediaDemo.java source file.
In the VideoScreen constructor, setup and initialize Player.
Complete the onClose method for the VideoScreen so that Player resources are cleaned up before the application exits.
Implement the setVolume method so that it sets the right volume level for the Player.
Complete the run method for the fullscreen MenuItem so that Player can be switched to the full screen mode.
Complete the run method for the pauseItem MenuItem so that Player is started and stopped depending on the current state.
Fill in the if blocks under the keyControl method so that volume is increased or decreased based on the volume key pressed.
Implement playerUpdate method so that Player events are shown in the eventField.
Download the completed code
In this exercise, you discovered the following things:
How to use the Player interface to playback a video.
How to use the PlayerListener to detect changes in the Player state.
How to record changes to the volume key to set the Player volume level.