You are here

function _video_common_get_player in Video 5

Same name and namespace in other branches
  1. 6 includes/common.inc \_video_common_get_player()
  2. 6.2 includes/common.inc \_video_common_get_player()
  3. 6.3 includes/common.inc \_video_common_get_player()

Get the object for the suitable player for the parameter resource

2 calls to _video_common_get_player()
video_upload_v_play in types/video_upload/video_upload.module
Implementation of hook_v_play
video_url_v_play in types/video_url/video_url.module
Implementation of hook_v_play

File

includes/common.inc, line 17
Add some common functions for the various video types supported

Code

function _video_common_get_player($node) {
  switch (_video_get_filetype($node->vidfile)) {
    case 'divx':
      return theme('video_play_divx', $node);
    case 'mov':
    case 'mp4':
    case '3gp':
    case '3g2':
    case 'mpg':
    case 'mpeg':
      return theme('video_play_quicktime', $node);
    case 'rm':
      return theme('video_play_realmedia', $node);
    case 'flv':
      return theme('video_play_flash', $node);
    case 'swf':
      return theme('video_play_swf', $node);
    case 'dir':
    case 'dcr':
      return theme('video_play_dcr', $node);
    case 'asf':
    case 'wmv':
    case 'avi':
      return theme('video_play_windowsmedia', $node);
    case 'ogg':
      return theme('video_play_ogg_theora', $node);
    case 'youtube':
      return theme('video_play_youtube', $node);
    case 'googlevideo':
      return theme('video_play_googlevideo', $node);
    default:
      drupal_set_message('Video type not supported', 'error');
      break;
  }
}