问题
I have a track on my website which utilizes the soundcloud HTML5 player. I was wondering if there is any way I can make it a little quieter that way it doesn't shock the viewer upon opening my page. If anyone could lead me in the right direction as to how to alter the players volume on soundcloud it would be much appreciated :D
I know it has something to do with javascript: setVolume(volume)
but I'm not familiar with JavaScript so if someone could help me out that'd be great. I want the volume to be at 50%.
If need be, i could also use the flash player.
I'm fine with using either HTML5 or flash player, I just want the volume to be set at 50% when someone plays it.
回答1:
You can do this by using the Widget API
Basically, the widget is embedded into your page with an iframe. Give the iframe an id
, include the API library (linked above) and then it's really simple.
SC.Widget('myIframeId').setVolume(50);
来源:https://stackoverflow.com/questions/10936901/soundcloud-html5-volume-control