HTMLSourceElement

The source element allows authors to specify multiple alternative media resources for media elements. It does not represent anything on its own.


Code Example:
<video controls autoplay>
 <source src=\'video.mp4\' type=\'video/mp4; codecs=\"avc1.42E01E, mp4a.40.2\"\'>
 <source src=\'video.ogv\' type=\'video/ogg; codecs=\"theora, vorbis\"\'
         onerror=\"fallback(parentNode)\">
 ...
</video>


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("source")   Y Y Y Y YY
media   Y Y Y Y YY
src   Y Y Y Y YY
track   Y Y Y Y YY
type   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.


Properties

String media
String src
TextTrack track
String type

Constructors

document.createElement("source")


Creates an HTMLSourceElement


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


Code Example:
var source = document.createElement("source");

Properties

String media



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

String src


The src attribute gives the address of the media resource. The value must be a valid non-empty URL potentially surrounded by spaces. This attribute must be present.


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

readonly TextTrack track


Returns the TextTrack object corresponding to the text track of the track element.


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

String type



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

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Feb 11 2013 14:51:07 GMT-0500 (EST)