Skip to content

Commit

Permalink
Updated YouTube's player
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed May 24, 2014
1 parent 8daa80a commit d3a4ad6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<addon addon_id="s9e" title="s9e Media Pack" url="https://github.com/s9e/XenForoMediaBBCodes" version_id="20140522" version_string="201405220" install_callback_class="s9e_MediaBBCodes" install_callback_method="install">
<addon addon_id="s9e" title="s9e Media Pack" url="https://github.com/s9e/XenForoMediaBBCodes" version_id="20140524" version_string="201405240" install_callback_class="s9e_MediaBBCodes" install_callback_method="install">
<bb_code_media_sites>
<site media_site_id="abcnews" site_title="ABC News" site_url="http://abcnews.go.com/" match_is_regex="1" supported="1">
<match_urls>!abcnews\.go\.com/[^/]+/video/[^/]+-(?'id'\d+)!</match_urls>
Expand Down
2 changes: 1 addition & 1 deletion build/upload/library/s9e/MediaBBCodes.php
Expand Up @@ -709,7 +709,7 @@ public static function renderYoutube($vars, $params)
{
$vars += array('id' => null, 'list' => null, 't' => null);

$html='<iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/'.htmlspecialchars($vars['id'],2);if(isset($vars['list'])||isset($vars['t'])){$html.='?';if(isset($vars['list'])){$html.='list='.htmlspecialchars($vars['list'],2);if(isset($vars['t']))$html.='&amp;';}if(isset($vars['t']))$html.='start='.htmlspecialchars($vars['t'],2);}$html.='"></iframe>';
$html='<iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/'.htmlspecialchars($vars['id'],2).'?controls=2';if(isset($vars['list']))$html.='&amp;list='.htmlspecialchars($vars['list'],2);if(isset($vars['t']))$html.='&amp;start='.htmlspecialchars($vars['t'],2);$html.='"></iframe>';

return $html;
}
Expand Down
14 changes: 7 additions & 7 deletions tests/Test.php
Expand Up @@ -615,27 +615,27 @@ public function getEmbedCallbackTests()
array(
'-cEzsCAzTak',
'<!-- s9e_MediaBBCodes::renderYoutube() -->',
'<iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/-cEzsCAzTak"></iframe>'
'<iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/-cEzsCAzTak?controls=2"></iframe>'
),
array(
'id=9bZkp7q19f0;t=113',
'<!-- s9e_MediaBBCodes::renderYoutube() -->',
'<iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/9bZkp7q19f0?start=113"></iframe>'
'<iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/9bZkp7q19f0?controls=2&amp;start=113"></iframe>'
),
array(
'id=pC35x6iIPmo;list=PLOU2XLYxmsIIxJrlMIY5vYXAFcO5g83gA',
'<!-- s9e_MediaBBCodes::renderYoutube() -->',
'<iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/pC35x6iIPmo?list=PLOU2XLYxmsIIxJrlMIY5vYXAFcO5g83gA"></iframe>'
'<iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/pC35x6iIPmo?controls=2&amp;list=PLOU2XLYxmsIIxJrlMIY5vYXAFcO5g83gA"></iframe>'
),
array(
'id=pC35x6iIPmo;list=PLOU2XLYxmsIIxJrlMIY5vYXAFcO5g83gA;t=123',
'<!-- s9e_MediaBBCodes::renderYoutube() -->',
'<iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/pC35x6iIPmo?list=PLOU2XLYxmsIIxJrlMIY5vYXAFcO5g83gA&amp;start=123"></iframe>'
'<iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/pC35x6iIPmo?controls=2&amp;list=PLOU2XLYxmsIIxJrlMIY5vYXAFcO5g83gA&amp;start=123"></iframe>'
),
array(
'-cEzsCAzTak',
'<div class="responsiveVideoContainer"><!-- s9e_MediaBBCodes::renderYoutube() --></div>',
'<div class="responsiveVideoContainer"><iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/-cEzsCAzTak"></iframe></div>'
'<div class="responsiveVideoContainer"><iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/-cEzsCAzTak?controls=2"></iframe></div>'
),
array(
'xyz',
Expand All @@ -645,12 +645,12 @@ public function getEmbedCallbackTests()
array(
'-cEzsCAzTak',
'<!-- s9e_MediaBBCodes::renderYoutube(1280, 620) -->',
'<iframe width="1280" height="620" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/-cEzsCAzTak"></iframe>'
'<iframe width="1280" height="620" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/-cEzsCAzTak?controls=2"></iframe>'
),
array(
'-cEzsCAzTak',
'<!-- s9e_MediaBBCodes::renderYoutube(1280,620) -->',
'<iframe width="1280" height="620" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/-cEzsCAzTak"></iframe>'
'<iframe width="1280" height="620" allowfullscreen="" frameborder="0" scrolling="no" src="//www.youtube.com/embed/-cEzsCAzTak?controls=2"></iframe>'
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion www/configure.html

Large diffs are not rendered by default.

0 comments on commit d3a4ad6

Please sign in to comment.