From 1fc3138c37564f44ea028c5fa8e69c718d08f363 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 8 Oct 2014 06:09:15 -0700 Subject: soundcloud using a slightly different oembed mechanism - react accordingly --- include/oembed.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/oembed.php b/include/oembed.php index de3a6edc8..8ce0fee96 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -56,6 +56,15 @@ function oembed_fetch_url($embedurl){ $txt = $x['body']; break; } + // soundcloud is now using text/json+oembed instead of application/json+oembed, + // others may be also + $entries = $xpath->query("//link[@type='text/json+oembed']"); + foreach($entries as $e){ + $href = $e->getAttributeNode("href")->nodeValue; + $x = z_fetch_url($href . '&maxwidth=' . $a->videowidth); + $txt = $x['body']; + break; + } } } } -- cgit v1.2.3