简体   繁体   English

soundcloud api-如何检查录制的曲目是否处于活动状态?

[英]soundcloud api - how to check recorded track is active or not?

How can I check recorded track is uploaded and active for embed. 我如何检查已记录的曲目已上传并处于激活状态。

I want to show embed preview of track once it upload is done. 上传完成后,我想显示曲目的嵌入预览。

but I am getting 404 error from scPlayer api while resolving the url. 但是我在解析URL时从scPlayer api收到404错误。

Is possible to track availability of track, based on that i can use sCplayer() 根据我可以使用sCplayer()来跟踪轨道的可用性

for resolving track. 解决轨道。

Any help? 有什么帮助吗?

Thanks Peter 谢谢彼得

I know in the /tracks resource there is a attribute called state which could be what you're looking for. 我知道/tracks资源中有一个名为state的属性,它可能就是您要寻找的。

On their docs, the example value they give is finished , so maybe it would read uploading or processing before the track is ready. 在他们的文档中,他们提供的示例值是finished ,因此也许它会在轨道准备好之前读取上uploadingprocessing NB: I haven't tried this myself. NB:我自己还没有尝试过。

{
  "id": 13158665,
  "created_at": "2011/04/06 15:37:43 +0000",
  "user_id": 3699101,
  "duration": 18109,
  "commentable": true,
  "state": "finished",
  "sharing": "public",
  "tag_list": "soundcloud:source=iphone-record",
  "permalink": "munching-at-tiannas-house",
  "description": null,
  "streamable": true,
  "downloadable": true,
  "genre": null,
  "release": null,
  "purchase_url": null,
  "label_id": null,
  "label_name": null,
  "isrc": null,
  "video_url": null,
  "track_type": "recording",
  "key_signature": null,
  "bpm": null,
  "title": "Munching at Tiannas house",
  "release_year": null,
  "release_month": null,
  "release_day": null,
  "original_format": "m4a",
  "original_content_size": 10211857,
  "license": "all-rights-reserved",
  "uri": "http://api.soundcloud.com/tracks/13158665",
  "permalink_url": "http://soundcloud.com/user2835985/munching-at-tiannas-house",
  "artwork_url": null,
  "waveform_url": "http://w1.sndcdn.com/fxguEjG4ax6B_m.png",
  "user": {
    "id": 3699101,
    "permalink": "user2835985",
    "username": "user2835985",
    "uri": "http://api.soundcloud.com/users/3699101",
    "permalink_url": "http://soundcloud.com/user2835985",
    "avatar_url": "http://a1.sndcdn.com/images/default_avatar_large.png?142a848"
  },
  "stream_url": "http://api.soundcloud.com/tracks/13158665/stream",
  "download_url": "http://api.soundcloud.com/tracks/13158665/download",
  "playback_count": 0,
  "download_count": 0,
  "favoritings_count": 0,
  "comment_count": 0,
  "created_with": {
    "id": 124,
    "name": "SoundCloud iPhone",
    "uri": "http://api.soundcloud.com/apps/124",
    "permalink_url": "http://soundcloud.com/apps/iphone"
  },
  "attachments_uri": "http://api.soundcloud.com/tracks/13158665/attachments"
}

from: http://developers.soundcloud.com/docs/api/tracks 来自: http : //developers.soundcloud.com/docs/api/tracks

alternatively, there could be another value, like duration or stream_url that will read NULL until the track is ready. 或者,可能还有另一个值,例如durationstream_url ,它们将读取NULL直到轨道准备就绪。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM