나는 성공적으로 모든 놀라운 일 후에없는 볼륨 컨트롤을 사용할 수 있다는 것을() 메소드가 고장 :(SoundCloud 위젯 API setVolume 메서드가 손상 되었습니까?
첫째,이 위젯을 사랑하지만 멀리 날려있어 setVolume를 제외하고, 사운드 클라우드의 위젯 API를 사용하고 있습니다 사람들은 100 % 오디오를 듣고 즉시 setVolume()을 사용하여 변경할 수없는 사이트에 즉시 "뒤로"버튼을 놓습니다 ... 나는 그것을 작동 시키거나 당겨야합니다 : (
다음은 무엇입니까? 무슨 일이 일어나고, 내가 인스턴스 (페이지에서 잘 재생되는 하중과) "위젯"라는있다.
widget.bind(SC.Widget.Events.READY, function() {
$('#audioIndictments').removeClass('remove'); // This disables a CSS rule, making the soundCloud iframe visible
widget.setVolume(10); // This should set the volume to 10% but doesn't :(
widget.getVolume(function(vol){
console.log(vol); // This outputs 0.1 in the console :/
console.log(widget); // This outputs the object in the console and I don't see anything out of whack :|
});
widget.play(); // This successfully fires up the widget and the audio begins playing :)
widget.setVolume(10); // Just to see if it makes a difference, after the play() method, I ran setVolume again after the play() method and still no change :(
widget.getVolume(function(vol){
console.log(vol); // This still outputs 0.1 in the console :/
});
});
이상한 결과를. I 비슷한 질문을하고 만족스러운 답변을 얻지 못한 또 다른 블로거를 찾았습니다. 여기 거래는 뭐니? 나는 무엇을 보지 못하니?
시간 :
같은 문제가 있습니다. 그것의 위에, 그것은 때로는 0에서 100, 또는 0에서 1로 볼륨을 반환합니다 : John M 솔루션은 작동합니다. – dikirill