Soundcloud HTML5 Volume Control

自闭症网瘾萝莉.ら 提交于 2020-12-27 05:55:52

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!