我曾经在一个小型的Soundcloud播放器上工作,它工作了好几天,直到今天。现在它不会加载任何声音。 Web控制台说:
TypeError: SC.streamStopAll is not a function
我用它来阻止所有播放的声音。如果我删除它,声音加载。但我需要一种方法来阻止所有的声音。我没有对代码进行任何更改,在SC或SoundManager方面做了哪些更改?
知道发生了什么以及如何解决它?
答案 0 :(得分:2)
SoundCloud javascript播放器现在已经坏了。为了所有人。甚至在SoundCloud的开发者网站上也是如此。
答案 1 :(得分:1)
SC.stream方法将为传递的轨道
准备一个soundManager2声音对象尝试:stopAll()
http://www.schillmania.com/projects/soundmanager2/doc/
http://developers.soundcloud.com/docs/api/sdks#javascript部分流媒体
答案 2 :(得分:1)
显然SoundManager2库已被删除,并被AudioManager取代以支持RTMP流。请参阅此提交:https://github.com/soundcloud/soundcloud-javascript/commit/3ee64f9a9864078348a445a51a3b133933ac74b1。
答案 3 :(得分:1)
我检查了github存储库:
https://github.com/soundcloud/soundcloud-javascript/commit/3ee64f9a9864078348a445a51a3b133933ac74b1
他们删除了soundmanager并用audiomanager替换它。但是没有关于新音频播放器的官方文档。它也很有趣,他们没有调整返回流网址的其他API方法。
现在使用:/ tracks /:track_id / streams
但是用
加载曲目数据时SC.get('/resolve', "SC_URL", function(){})
它仍然在stream_url属性中包含/ tracks /:track_id / stream。
API文档也引用了soundmanager。