HTML5 Video

An audio element represents a sound or audio stream.

Supported Platform(s)

- BlackBerry OS 6.0+
- BlackBerry PlayBook

View Supported Platform Table

APIOS 5.0OS 6.0OS 7.0PlayBookRipple
document.createElement("video")   Y Y Y 
height   Y Y Y 
poster   Y Y Y 
videoHeight   Y Y Y 
videoWidth   Y Y Y 
width   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.

document.createElement("video")


document.createElement("video")

Supported Platform(s)

 - BlackBerry OS 6.0+
 - BlackBerry PlayBook

Description

Creates an HTMLVideoElement



Code Example(s)

var video = document.createElement('video');
video.src = 'video.avi';
video.controls = true;
document.body.appendChild(video);

Properties:


Property Type Description Supported Platform(s)
height Number Height of the video area.
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook
poster String The address of an image file that the user agent can show while no video data is available. If present, must contain a valid non-empty URL potentially surrounded by spaces.
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook
videoHeight Number
readonly
videoHeight must return the intrinsic height of the video in CSS pixels.
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook
videoWidth Number
readonly
videoWidth must return the intrinsic width of the video in CSS pixels.
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook
width Number Width of the video area.
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook

Code Example(s)


Test if user can play H.264:
function canPlayH264() {
    var v = document.createElement(\'video\');
    return !!(v.canPlayType && v.canPlayType(\'video/mp4; codecs=\"avc1.42E01E, mp4a.40.2\"\').replace(/no/, \'\'));
}

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Dec 30 2012 13:31:18 GMT-0500 (EST)