Skip to content Skip to sidebar Skip to footer

Soundcloud Api: Setvolume On Audiomanager.js

We've been having problems with the setVolume function while using the SoundCloud Javascript API. The trace: Uncaught IndexSizeError: Index or size was negative, or greater than th

Solution 1:

It seems like the SoundCloud JavaScript SDK has changed over night. I'm facing similar issues. The SDK is using the HTML5AudioPlayer object now to stream tracks. As for you question, I've noticed that the volume value needs to be between 0 and 1 opposed to 0 and 100 in the "old" version. So be sure to call sound.setVolume(0.5) instead of sound.setVolume(50). Also, the "whileplaying" event is not firing anymore.

It would be nice of SoundCloud to update their docs / inform devs about SDK changes in the future. In the mean time, I'm looking at https://connect.soundcloud.com/audiomanager/audiomanager.js to find answers to my questions.

Post a Comment for "Soundcloud Api: Setvolume On Audiomanager.js"