Skip to content

Instantly share code, notes, and snippets.

@propagated
Last active May 8, 2023 04:52
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save propagated/78aaedfbc0c23add7691bb975b51a3ff to your computer and use it in GitHub Desktop.
Save propagated/78aaedfbc0c23add7691bb975b51a3ff to your computer and use it in GitHub Desktop.
control soundcloud embed volume
//load soundcloud js api if needed
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'http://w.soundcloud.com/player/api.js';
document.head.appendChild(script);
//get the id of the player iframe or inject it using chrome
var id = 'scplayer',
widgetIframe = document.getElementById(id),
fixWidget = SC.Widget(widgetIframe);
fixWidget.setVolume(50); //% between 1 and 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment