0

所以我能够像这样检索视频嵌入:

iframe style='overflow: hidden; border: 0; width: 720px; height: 506px' src='http://stagevu.com/embed?
width=720&amp;height=450&amp;background=000&amp;uid=ymuqokfxatwt' scrolling='no'></iframe> 

当用户以如下形式输入视频的简单 url 链接时: http://stagevu.com/video/ipfmdyadiqgt,使用以下代码:

// code to display StageVu
if (preg_match("/http:\/\/stagevu.com\/video\/([a-z]*)/i", $url, $matches)) {
return '<iframe style="overflow: hidden; border: 0; width: 700px; height: 400px"
   src="http://stagevu.com/embed?width=700&amp;height=400&amp;background=000& amp;uid='
   .$matches[1]. '" scrolling="no">'.
'</iframe>';
}

我想知道这样的链接:https ://soundcloud.com/darkelixir/teknian-behemoth-darkelixir

像这样疯狂嵌入:

iframe width="100%" height="166" scrolling="no" frameborder="no"
  src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F80432122"> 
  </iframe> 

当没有易于使用的 ID 系统时,如何允许通过 url 嵌入?

4

1 回答 1

0

http://developers.soundcloud.com/docs/api/reference#resolve

看看这个,它用于解析 URL!

于 2013-03-11T09:08:04.737 回答