You are here

function html5_media_get_source in HTML5 Media 7

Returns the media source provided a field.

Parameters

object A Drupal file object.:

2 calls to html5_media_get_source()
html5_media_get_extension in ./html5_media.module
Returns the extension provided a file object.
theme_html5_player in ./html5_media.module
Theme a media player.

File

./html5_media.module, line 233

Code

function html5_media_get_source($file) {
  if ($file) {
    if (isset($file->uri)) {
      return file_create_url($file->uri);
    }
    else {
      if (!empty($file->value)) {
        return $file->value;
      }
    }
  }
  return '';
}