1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-17 20:01:47 +02:00

Youtube browser now supports searching by video and playlist ids. eg. video:_j0b9syAuIk

This commit is contained in:
Cameron
2015-03-31 14:48:07 -07:00
parent 20f2b552da
commit 7c602253be
7 changed files with 164 additions and 28 deletions

View File

@@ -2972,7 +2972,7 @@ class e_parser
{
$ext = pathinfo($file,PATHINFO_EXTENSION);
return ($ext == 'youtube') ? true : false;
return ($ext == 'youtube' || $ext == 'youtubepl') ? true : false;
}
@@ -3041,6 +3041,26 @@ class e_parser
return '<div class="video-responsive '.vartrue($parm['class']).'">'.$video.'</div>';
}
if($type =='youtubepl')
{
if($thumb == 'tag')
{
$thumbSrc = e107::getMedia()->getThumb($id);
return "<img class='img-responsive' src='".$thumbSrc."' alt='Youtube Video Playlist' style='width:".vartrue($parm['w'],'80')."px'/>";
}
if($thumb == 'src')
{
return e107::getMedia()->getThumb($id);
}
$video = '<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list='.$id.'" frameborder="0" allowfullscreen></iframe>';
return '<div class="video-responsive '.vartrue($parm['class']).'">'.$video.'</div>';
}
if($type == 'mp4') //TODO FIXME
{