I'm trying to use the SoundCloud API to check if a song is embeddable, is this the same as streamable? My code looks like this:
$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 { ...
I can get the trackid, username, title & downloadable easily, but is streamable the correct property to look for? I'm talking about when you go to embed a song and it says "Oops this track can't be pl开发者_运维知识库ayed outside of SoundCloud." I want to make sure this doesn't happen and unallow a song if it's one of those songs.
Referring to the documentation the streamable
proprety exists. And yes it's the right one.
精彩评论