BBjSysGui::playSoundFile
Description
In BBj 22.0 and higher, this method plays the sound from a sound file.
Syntax
Return Value | Method |
---|---|
void | playSoundFile(string filename) |
void | playSoundFile(string filename, boolean loop) |
void | playSoundFile(string filename, boolean loop, string mime) |
Parameters
Variable | Description |
---|---|
filename | The filename of the audio to play, or "" to stop playing previously specified audio. |
loop | If this boolean value is true, the audio will play in a loop until stopped. |
mime | The BUI client requires an audio MIME type, which can usually be determined automatically from the sound file. If it's unable to automatically determine the MIME type (e.g. "audio/wav"), you can explicitly specify it here. |
Return Value
None.
Remarks
Each client defines its own set of supported audio formats. Browsers support a broad range of formats, but the Java GUI client is usually limited to AU, AIFF, and WAV.
Mobile browsers only allow sounds to play as a direct result of user action, so this is treated as a no-op in iOS and Android when running in BUI.
Example
|
Version History
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.
HTML5 Audio: Supported audio coding formats