Bandcamp Volume Bar

adds a volume bar to Bandcamp

< Feedback on Bandcamp Volume Bar

Review: Bad - script does not work

§
Posted: 10. 11. 2016

doesn't work, fix included

The four lines in the code:
$("#audioSource").volume

should be instead:
$("#audioSource")[0].volume

§
Posted: 10. 11. 2016

additionally, the element isn't ready until the document is loaded, so the initial volume setting will generate an error. So change the first volume setting:

//Sexy Script!
$("#audioSource").volume = percentage/100;

to:
//Sexy Script!
$( document ).ready(function() {
$("#audioSource")[0].volume = percentage/100;
});

Post reply

Sign in to post a reply.