0

我正在尝试使用 SoundCloud API 来检查歌曲是否可嵌入,这与可流式传输相同吗?我的代码如下所示:

$trackid = $track['id'];
$username = mysql_real_escape_string($track['user']['username']);
$title = mysql_real_escape_string($track['title']);
$downloadable = $track['downloadable'];
$streamable = $track['streamable'];

        // Check if streamable
        if(!$streamable) {

        header( 'Location: error.php' );

        } else { ...

我可以轻松获取 trackid、用户名、标题和可下载的内容,但流式传输是要查找的正确属性吗?我说的是当您嵌入一首歌曲时,它会显示“糟糕,这首曲目无法在 SoundCloud 之外播放”。我想确保这不会发生,并且如果它是其中一首歌曲,则不允许歌曲。

4

1 回答 1

1

参考该属性存在的文档。streamable是的,这是正确的。

于 2011-11-04T10:13:45.990 回答