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. In case of an image, this attribute has value 0. (Number)
  • height: The height of the image or video in pixels. In the case of a sound clip, this attribute has value 0. (Number)
  • width: The width of the image or video in pixels. In the case of a sound clip, this attribute has value 0. (Number)
  • duration: The length of the video or sound clip in seconds. In the case of an image, this attribute has value 0. (Number)

BlackBerry WebWorks Quirks

There is no API that provides format information of media files. So the MediaFileData object returned by the MediaFile.getFormatData function will have the following default values:

  • codecs: Not supported. The attribute will always be null.
  • bitrate: Not supported. The attribute will always be 0.
  • height: Not supported. The attribute will always be 0.
  • width: Not supported. The attribute will always be 0.
  • duration: Not supported. The attribute will always be 0.

Android Quirks

Support for the MediaFileData properties is as follows:

  • codecs: Not supported. The attribute will always be null.
  • bitrate: Not supported. The attribute will always be 0.
  • height: Supported. (Image and video files only).
  • width: Supported. (Image and video files only).
  • duration: Supported. (Audio and video files only).

iOS Quirks

Support for the MediaFileData properties is as follows:

  • codecs: Not supported. The attribute will always be null.
  • bitrate: Supported on iOS4 devices for audio only. The attribute will always be 0 for image and video.
  • height: Supported. (Image and video files only).
  • width: Supported. (Image and video files only).
  • duration: Supported. (Audio and video files only).