You are here

function emvideo_youtube_embedded_link in Embedded Media Field 6

hook emvideo_PROVIDER_embedded_link($video_code) returns a link to view the video at the provider's site

Parameters

$video_code: the string containing the video to watch @return a string containing the URL to view the video at the original provider's site

File

contrib/emvideo/providers/youtube.inc, line 353
This include processes youtube.com media files for use by emfield.module.

Code

function emvideo_youtube_embedded_link($video_code) {
  if (strpos($video_code, 'PLAYLIST_') === 0) {

    // A youtube playlist
    return 'http://youtube.com/p/' . substr($video_code, 9);
  }
  return 'http://www.youtube.com/watch?v=' . $video_code;
}