bool PlayAudioFile(string, bool, AudioStreamType)
Plays the specified audio file.
Security
Trust Level Required: Full trust
Parameters
Name | Description |
filePath |
string The full file path of the file to play. |
loop |
bool If false, play the file only once. If true, play the file continuously. |
streamType |
(Optional) AudioStreamType
If specified, selects which audio stream to use when playing the file. |
Return
Returns true if successful, false otherwise.
Remarks
Calling this function with filePath set to null or an empty string will stop the currently looping file if there is one.
Examples
if (!KioApp.PlayAudioFile('/path/to/soundfile.mp3', false))
alert('Failed to play file.');
Requirements
KioWare for Android version 3.16 or greater.