Press on the image to return to the main documentation page.
Media Player (Core)
List of types:
MediaPlayer
MediaPlayer
MediaPlayer allows you to play audio files.
Note that in case of an interruption (phone call for example) the playback will be paused automatically.
You should handle the EndInterruption event and call MediaPlayer.Play to resume playback.
Events:
Complete
EndInterruption
Members:
Duration
As
Int
[read
only]
Initialize
(
Dir
As
String
,
FileName
As
String
,
EventName
As
String
)
IsInitialized
As
Boolean
Looping
As
Boolean
Pause
Play
Position
As
Int
Stop
Tag
As
Object
Volume
As
Float
Members description:
Duration
As
Int
[read
only]
Returns the loaded sound total duration in milliseconds;
Initialize
(
Dir
As
String
,
FileName
As
String
,
EventName
As
String
)
Initializes the MediaPlayer and loads the specified file.
IsInitialized
As
Boolean
Tests whether this object was initialized.
Looping
As
Boolean
Set to True to automatically restart the playback.
Pause
Pauses the playback.
Play
Starts or resumes the playback.
Position
As
Int
Gets or sets the playback position (in milliseconds).
Stop
Stops the playback. You should initialize MediaPlayer to play another sound.
Tag
As
Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
Volume
As
Float
Gets or sets the playback volume (value between 0 to 1).
Top