HTML5 Audio

An audio element represents a sound or audio stream.


Supported Platform(s)

- BlackBerry OS 6.0+
- BlackBerry PlayBook 1.0+
- BlackBerry 10
- Ripple Emulator
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
document.createElement("audio")   Y Y Y Y YY
new Audio([String: url])   Y Y Y Y YY

Configuration Document Settings

To use all of the API described for this object, you must ensure the following settings are in your configuration document:

This API does not require a <feature> element to be declared in the configuration document of your BlackBerry WebWorks Application.

Permission Elements (PlayBook and BlackBerry 10+)
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application.

Constructors

document.createElement("audio")


Creates an HTMLAudioElement


Supported Platforms
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook 1.0+
 - BlackBerry 10
 - Ripple Emulator


Code Example:
var audio = document.createElement('audio');
audio.src = 'audio.wav';
audio.controls = true;
document.body.appendChild(audio);

new Audio([String: url])


An HTMLAudioElement can also be created using the named constructor Audio().


Supported Platforms
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook 1.0+
 - BlackBerry 10
 - Ripple Emulator


Parameters
url URL of the source

Code Example:
var audio = new Audio();
audio.src = 'audio.wav';
var audio = new Audio('audio.wav');
Documentation generated by JsDoc Toolkit 2.4.0 on Sun Dec 30 2012 18:15:38 GMT-0500 (EST)