Media & MediaManager APIs.See: Description
| Interface | Description |
|---|---|
| AsyncMedia |
An interface for media elements that provides asynchronous pause and play functionality
as well as support for state change events, so that interested parties can register
to be notified when state changes between play and pause.
|
| AudioBuffer.AudioBufferCallback |
A callback that can be registered to receive notifications when the contents of the
AudioBuffer is changed.
|
| Media |
Media control interface allows for media playback, recording.
|
| Class | Description |
|---|---|
| AbstractMedia |
An abstract base class for AsyncMedia.
|
| AsyncMedia.MediaErrorEvent |
Encapsulates a media error event.
|
| AsyncMedia.MediaStateChangeEvent |
Encapsulates a state-change event on a Media object.
|
| AsyncMedia.PauseRequest |
An async resource used to track the progress of a pauseAsync() request.
|
| AsyncMedia.PlayRequest |
An async resource used to track the progress of a playAsync() request.
|
| AudioBuffer |
This class can be used to capture raw PCM data from the device's microphone.
|
| MediaManager |
Allow us to create objects using String URI's or with a stream to
the media data.
Notice that the underlying platforms contains the actual codecs, therefore you need to play common media file types such as mp3, mp4 to successfully play them across devices on all target platforms. |
| MediaMetaData |
MetaData for use by
RemoteControlListener to provide information about
the currently playing background media on the device's lock screen. |
| MediaRecorderBuilder |
A builder class to generate a Media recorder with specific settings.
|
| RemoteControlListener |
A base class that is meant to be overridden to implement functionality that
responds to the device's remote control for media playback.
|
| WAVWriter |
A class that can write raw PCM data to a WAV file.
|
| Enum | Description |
|---|---|
| AsyncMedia.MediaErrorType |
Enum encapsulating the different types of media errors that can occur.
|
| AsyncMedia.State |
An enum to represent the state of a media object.
|
| Exception | Description |
|---|---|
| AsyncMedia.MediaException |
Encapsulates a media exception.
|
Video and Audio playback support are handled within this package using the
Media & MediaManager APIs.
Said API's allow for video playback both within a native full screen player and embedded within
an application screen.
Simplified video playback API is also available via the MediaPlayer class.
Capture/recording is handled separately for the most part thru the
Capture API. However, there is some basic low level recording
functionality within MediaManager as well.
The code below demonstrates capturing and playing back audio files using this API:
The sample code below demonstrates simple video playback.

Copyright © 2023. All rights reserved.