MediaFileData

Encapsulates format information about a media file.

Properties

  • codecs: The actual format of the audio and video content. (DOMString)

  • bitrate: The average bitrate of the content. The value is zero for images. (Number)

  • height: The height of the image or video in pixels. The value is zero for audio clips. (Number)

  • width: The width of the image or video in pixels. The value is zero for audio clips. (Number)

  • duration: The length of the video or sound clip in seconds. The value is zero for images. (Number)

BlackBerry WebWorks Quirks

No API provides format information for media files, so the MediaFileData object returned by [MediaFile.getFormatData]([MediaFile](MediaFile.html).getFormatData.html) features the following default values:

  • codecs: Not supported, and returns null.

  • bitrate: Not supported, and returns zero.

  • height: Not supported, and returns zero.

  • width: Not supported, and returns zero.

  • duration: Not supported, and returns zero.

Android Quirks

Supports the following MediaFileData properties:

  • codecs: Not supported, and returns null.

  • bitrate: Not supported, and returns zero.

  • height: Supported: image and video files only.

  • width: Supported: image and video files only.

  • duration: Supported: audio and video files only.

iOS Quirks

Supports the following MediaFileData properties:

  • codecs: Not supported, and returns null.

  • bitrate: Supported on iOS4 devices for audio only. Returns zero for images and videos.

  • height: Supported: image and video files only.

  • width: Supported: image and video files only.

  • duration: Supported: audio and video files only.