我一直在尝试使用Soundcloud博客页面中提供的示例,以便我可以将音量设置得更低。
我只更改了
我已经尝试过将以下内容放置在我的模板头部和不放置,但似乎没有关系。
这是我从Soundcloud示例中调整的代码:
我只更改了
iframe
大小和src=
到我的播放列表,并将音量设置为10,这样如果它起作用,我就能注意到差异。到目前为止,我没有观察到任何变化,音量仍然是100%。我已经尝试过将以下内容放置在我的模板头部和不放置,但似乎没有关系。
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
这是我从Soundcloud示例中调整的代码:
<iframe id="sc-widget" width="350" height="332" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F1417174&auto_play=true&show_artwork=false&color=37415f"></iframe>
<script src="http://w.soundcloud.com/player/api.js" type="text/javascript"></script>
<script type="text/javascript">
(function(){
var widgetIframe = document.getElementById('sc-widget'),
widget = SC.Widget(widgetIframe);
widget.bind(SC.Widget.Events.READY, function() {
widget.bind(SC.Widget.Events.PLAY, function() {
// get information about currently playing sound
widget.getCurrentSound(function(currentSound) {
console.log('sound ' + currentSound.get('') + 'began to play');
});
});
// get current level of volume
widget.getVolume(function(volume) {
console.log('current volume value is ' + volume);
});
// set new volume level
widget.setVolume(10);
});
}());
</script>
有人能帮我理解我缺少了什么来控制音量吗?
是否是jquery冲突导致的?如果是,您对如何解决有什么想法吗?