You are here

function jw_player_supported_mimetypes in JW Player 7.2

Returns a list of mime types supported by JW player.

Return value

array A list of mime types, as an array of strings.

1 call to jw_player_supported_mimetypes()
jw_player_supports in ./jw_player.module
Checks a file for JW Player supported media formats.

File

./jw_player.module, line 982
Adds a theme function which allows theme developers to use the JW Player.

Code

function jw_player_supported_mimetypes() {
  $types =& drupal_static(__FUNCTION__);
  if (!$types) {
    $types = array(
      // Container format listed on http://www.longtailvideo.com/support/jw-player/28836/media-format-support
      // MP4 (video)
      'video/mp4',
      // FLV (video)
      'video/flv',
      // WebM (video)
      'video/webm',
      // AAC (audio)
      'audio/aac',
      'audio/aacp',
      'audio/3gpp',
      'audio/3gpp2',
      'audio/mp4',
      'audio/MP4A-LATM',
      'audio/mpeg4-generic',
      // MP3 (audio)
      'audio/mpeg',
      'audio/MPA',
      'audio/mpa-robust',
      // Other container formats.
      // Vorbis (video)
      'video/ogg',
      // Quicktime (video)
      'video/quicktime',
      // Matroska (audio and video)
      'video/x-matroska',
      'audio/x-matroska',
      // WebM (audio)
      'audio/webm',
      // Vorbis (audio)
      'audio/ogg',
    );
    drupal_alter('jw_player_supported_mimetypes', $types);
  }
  return $types;
}