Tôi đã cố gắng sử dụng ví dụ được đưa ra trên trang Blog Soundcloud này để tôi có thể đặt âm lượng thấp hơn. http://developers.soundcloud.com/blog/html5-widget-apiĐiều khiển Soundcloud HTML5 Widget Player Volume
Tôi chỉ thay đổi kích thước iframe và src = thành danh sách phát và đặt.Volume thành 10 để tôi có thể nhận thấy sự khác biệt nếu nó hoạt động. Cho đến giờ, không có khối lượng thay đổi nào ở mức 100%
Tôi đã thử nó với và không đặt các phần sau vào phần đầu mẫu của tôi. Có vẻ không quan trọng.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
Đây là mã mà tôi điều chỉnh từ ví dụ 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>
Dưới đây là các trang web Joomla nơi mã này đang hoạt động. http://mediaservicesnyc.com/
Ai đó có thể vui lòng giúp tôi hiểu những gì tôi thiếu để kiểm soát âm lượng.
Đây có phải là cuộc xung đột gay gắt không? Nếu vậy, bất kỳ suy nghĩ về cách giải quyết nó?
Trân trọng, Eric