Merge pull request #1247 from annando/issue-1191-youtube
Fix for issue 1191 - Embedded Youtube video isn't playing when SSL is active
This commit is contained in:
commit
7fc501d6dc
|
@ -78,6 +78,11 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){
|
||||||
if (!is_object($j))
|
if (!is_object($j))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Always embed the SSL version
|
||||||
|
if (isset($j->html))
|
||||||
|
$j->html = str_replace(array("http://www.youtube.com/", "http://player.vimeo.com/"),
|
||||||
|
array("https://www.youtube.com/", "https://player.vimeo.com/"), $j->html);
|
||||||
|
|
||||||
$j->embedurl = $embedurl;
|
$j->embedurl = $embedurl;
|
||||||
|
|
||||||
// If fetching information doesn't work, then improve via internal functions
|
// If fetching information doesn't work, then improve via internal functions
|
||||||
|
|
|
@ -9,17 +9,18 @@ function oembed_content(&$a){
|
||||||
echo oembed_replacecb($url);
|
echo oembed_replacecb($url);
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($a->argv[1]=='h2b'){
|
if ($a->argv[1]=='h2b'){
|
||||||
$text = trim(hex2bin($_REQUEST['text']));
|
$text = trim(hex2bin($_REQUEST['text']));
|
||||||
echo oembed_html2bbcode($text);
|
echo oembed_html2bbcode($text);
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($a->argc == 2){
|
if ($a->argc == 2){
|
||||||
echo "<html><body>";
|
echo "<html><body>";
|
||||||
$url = base64url_decode($a->argv[1]);
|
$url = base64url_decode($a->argv[1]);
|
||||||
$j = oembed_fetch_url($url);
|
$j = oembed_fetch_url($url);
|
||||||
|
|
||||||
echo $j->html;
|
echo $j->html;
|
||||||
// logger('mod-oembed ' . $j->html, LOGGER_ALL);
|
// logger('mod-oembed ' . $j->html, LOGGER_ALL);
|
||||||
echo "</body></html>";
|
echo "</body></html>";
|
||||||
|
|
Loading…
Reference in a new issue