Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Slider for radio.yandex.ru
- // ====||=============
- $('.player-controls').append('<input type="range" id="size" oninput="position()" value="1">');
- $('span.icon.icon_pp').click(function () {
- if (!externalAPI.isPlaying()) {
- var prInterval = setInterval(function () {
- var pr = externalAPI.getProgress();
- $('#size').attr('max', pr.duration).val(pr.position);
- }, 1000);
- } else {
- clearInterval(prInterval);
- }
- });
- function position() {
- externalAPI.setPosition($('#size').val());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement