私はsoundcloudウィジェットAPI(https://developers.soundcloud.com/docs/api/html5-widget)を使用しようとしていますsoundcloud web widget APIは古くなっていますか?
そして、私はセットに含まれるトラックに関するデータを取得したいと思います。
しかし、widget.getSounds()とwidget.getCurrentSoundを除く他のすべてのメソッドは機能しているようです。
ゲッターが非同期でコールバックを使用していることを理解しています。
プラス、私は他の方法を試してみたので、サウンドオブジェクトは単純な配列ではないことがわかったが、失敗しました。..
任意のヘルプや洞察してください
widget
_ {}
widget.getVolume(function(ret){console.log(ret)});
_ {}
VM5139:1 50
widget.getDuration(function(ret){console.log(ret)});
_ {}
VM5164:1 255057
widget.getPosition(function(ret){console.log(ret)});
_ {}
VM5190:1 92164.92599999999
widget.getCurrentSound(function(ret){console.log(ret)});
_ {}
VM2993:3 Uncaught TypeError: currentSound.get is not a function
at _.<anonymous> (<anonymous>:3:47)
at m (sc.js:1)
at w (sc.js:1)
(anonymous) @ VM2993:3
m @ sc.js:1
w @ sc.js:1
widget.getCurrentSound(function(ret){console.log(ret.title)});
_ {}
VM2993:3 Uncaught TypeError: currentSound.get is not a function
at _.<anonymous> (<anonymous>:3:47)
at m (sc.js:1)
at w (sc.js:1)
(anonymous) @ VM2993:3
m @ sc.js:1
w @ sc.js:1
widget.getCurrentSound(function(ret){console.log(JSON.stringify(ret))});
_ {}
3VM2993:3 Uncaught TypeError: currentSound.get is not a function
at _.<anonymous> (<anonymous>:3:47)
at m (sc.js:1)
at w (sc.js:1)
(anonymous) @ VM2993:3
m @ sc.js:1
w @ sc.js:1
widget.getCurrentSound(function(ret){console.dir(ret)});
_ {}
VM2993:3 Uncaught TypeError: currentSound.get is not a function
at _.<anonymous> (<anonymous>:3:47)
at m (sc.js:1)
at w (sc.js:1)
でのものと全く同じフォーマットされていますさらに詳細に?何かエラーがありますか?そしてもしそうなら、彼らは何ですか? –
@BrettDeWoody getCurrentSound()とgetSounds()は、私が考えることのできる方法ではアクセスできません。戻り値は、返されたサウンドオブジェクトを記録しようとすると "currentSound.getは関数ではありません"のようなものです。返されたオブジェクトを使用する適切な方法はありますか? – Moon