function video_filter_youtube_playlist_html5 in Video Filter 7.3
Same name and namespace in other branches
- 6.3 video_filter.codecs.inc \video_filter_youtube_playlist_html5()
HTML5 callback for YouTube (Playlist) codec.
See also
1 string reference to 'video_filter_youtube_playlist_html5'
- video_filter_codec_info in ./
video_filter.codecs.inc - Implements hook_codec_info().
File
- ./
video_filter.codecs.inc, line 1100 - This file contains all codecs provided by Video Filter.
Code
function video_filter_youtube_playlist_html5($video) {
$attributes = array(
'rel' => $video['related'] ? 'rel=1' : 'rel=0',
'autoplay' => $video['autoplay'] ? 'autoplay=1' : 'autoplay=0',
'wmode' => 'wmode=opaque',
);
$video['source'] = '//www.youtube.com/embed/videoseries?list=' . $video['codec']['matches'][1] . '&' . implode('&', $attributes);
return video_filter_iframe($video);
}