我一直在尝试使用此Soundcloud博客页面上给出的示例,以便我可以将音量设置得更低。 http://developers.soundcloud.com/blog/html5-widget-api控制Soundcloud HTML5 Widget播放器卷
我只改变了iframe大小和src =我的播放列表和set.Volume为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>
这里是Joomla的网站,这个代码是活的。 http://mediaservicesnyc.com/
有人可以帮助我了解我缺乏控制音量。
这是一个jQuery的冲突?如果是这样,关于如何解决它的任何想法?
此致 埃里克