Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. // Slider for radio.yandex.ru
  2. // ====||=============
  3. $('.player-controls').append('<input type="range" id="size" oninput="position()" value="1">');
  4. $('span.icon.icon_pp').click(function () {
  5. if (!externalAPI.isPlaying()) {
  6. var prInterval = setInterval(function () {
  7. var pr = externalAPI.getProgress();
  8. $('#size').attr('max', pr.duration).val(pr.position);
  9. }, 1000);
  10. } else {
  11. clearInterval(prInterval);
  12. }
  13. });
  14.  
  15. function position() {
  16. externalAPI.setPosition($('#size').val());
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement