Last active
May 8, 2023 04:52
-
-
Save propagated/78aaedfbc0c23add7691bb975b51a3ff to your computer and use it in GitHub Desktop.
control soundcloud embed volume
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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