HTML5 Audio
An audio element represents a sound or audio stream.
Supported Platform(s)
- BlackBerry OS 6.0+
- BlackBerry PlayBook
API | OS 5.0 | OS 6.0 | OS 7.0 | PlayBook | Ripple |
---|---|---|---|---|---|
document.createElement("audio") | Y | Y | Y | ||
new Audio([String: url]) | Y | Y | Y |
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 Only) |
---|
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
API Summary
Constructors
Functions
- Functions inherited from class HTMLMediaElement:
- addTrack canPlayType load pause play
Properties
- Properties inherited from class HTMLMediaElement:
- autoplay controls currentSRC currentTime defaultPlaybackRate duration ended error initialTime loop muted networkState paused playbackRate played preload readyState seekable seeking src startOffsetTime textTracks volume
document.createElement("audio")
document.createElement("audio") |
Supported Platform(s)
- BlackBerry OS 6.0+- BlackBerry PlayBook
Description
Creates an HTMLAudioElement
Code Example(s)
var audio = document.createElement('audio'); audio.src = 'audio.wav'; audio.controls = true; document.body.appendChild(audio);
new Audio([String: url])
new Audio([String: url]) |
Supported Platform(s)
- BlackBerry OS 6.0+- BlackBerry PlayBook
Description
An HTMLAudioElement can also be created using the named constructor Audio().
Parameter | Type | Description |
---|---|---|
url |
String
Optional |
URL of the source |
Code Example(s)
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 13:31:17 GMT-0500 (EST)