The Media Sampler MIDlet consists of the following classes:
MIDlet class:
com.nokia.example.mmapi.mediasampler.MediaSamplerMIDlet
UI classes (in viewer package):
com.nokia.example.mmapi.mediasampler.viewer.AudioCanvas (Canvas)
com.nokia.example.mmapi.mediasampler.viewer.MediaList (List)
com.nokia.example.mmapi.mediasampler.viewer.SupportForm (Form)
com.nokia.example.mmapi.mediasampler.viewer.VideoCanvas (Canvas)
com.nokia.example.mmapi.mediasampler.viewer.VideoSourceSelector (List)
Model classes:
com.nokia.example.mmapi.mediasampler.model.DRMPlayer
com.nokia.example.mmapi.mediasampler.model.PlayerPool
Data type classes:
com.nokia.example.mmapi.mediasampler.data.Media
com.nokia.example.mmapi.mediasampler.data.MediaFactory
The MediaList
main view is created and displayed
by the MediaSamplerMIDlet
class. A reference of MediaSamplerMIDlet
is
passed to all LCDUI components of the application (MediaList
, AudioCanvas
, VideoSourceSelector
, and so on). The reference is used for getting the display and for displaying
an alert when an error occurs. MediaList
creates and
displays the classes AudioCanvas
, VideoSourceSelector
, SupportForm
,
and DRMPlayer
.
PlayerPool
is a class that handles audio player
pooling and playing. DRMPlayer
’s task is to play DRM-protected
audio files.
The MediaFactory
class provides media-specific
information such as available sound and video medias, their MIME types and
file paths in an application package (JAR). MediaFactory
reads
resource-specific file path properties from the application descriptor (JAD).
Data information returned from MediaFactory
is encapsulated
in the Media class.
UI classes in the viewer package display the UI or route to another display.