You are here

function _video_get_fileurl in Video 6.2

Same name and namespace in other branches
  1. 5 video.module \_video_get_fileurl()
  2. 6 video.module \_video_get_fileurl()

Returns an absolute url which references to the video file

Parameters

$video_file: string containing absolute or relative URL to video.

Return value

string containing absolute URL path to video file.

10 calls to _video_get_fileurl()
theme_video_play_dcr in includes/common.inc
Play Director .dcr/.dir files.
theme_video_play_divx in includes/common.inc
Play videos from in DivX format
theme_video_play_flash in includes/common.inc
Play videos from in FLV Flash video format
theme_video_play_ogg_theora in includes/common.inc
Play Ogg Theora videos with Cortado Applet
theme_video_play_quicktime in includes/common.inc
Play videos from in Quicktime format

... See full list

File

./video.module, line 1394
video.module

Code

function _video_get_fileurl($video_file) {
  global $base_url;

  //creation of absolute url
  if (preg_match("/^(http|ftp|mm|rstp)(s?):\\/\\//", $video_file)) {

    //If path is absolute
    return check_plain($video_file);
  }
  else {

    // path is relative to drupal install
    return check_plain($base_url . '/' . $video_file);
  }
}