I am currently working with the SoundCloud widget API ().
My main goal is to retrieve information about the tracks within a set.
Unfortunately, it seems like I am only able to utilize the methods widget.getSounds() and widget.getCurrentSound successfully.
I am aware that these getter functions work asynchronously, and I am implementing a callback accordingly.
However, I have noticed that the sound object is not a simple array, which has led me to try other approaches without success.
If anyone can provide assistance or insight, it would be greatly appreciated.
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)