You are here

function media_23video_file_formatter_video_view in Media 23video 7

Implements hook_file_formatter_FORMATTER_view().

See also

media_23video_file_formatter_info()

File

./media_23video.module, line 116
23Video service for Media.

Code

function media_23video_file_formatter_video_view(\stdClass $file, array $display, $langcode) {
  if (MEDIA_23VIDEO_SERVICE == file_uri_scheme($file->uri)) {
    return array(
      '#markup' => file_stream_wrapper_get_instance_by_uri($file->uri)
        ->getHtml($display['settings']),
    );
  }
  return NULL;
}