1
0
Fork 0

Terrible player bug fix

This commit is contained in:
magnolia-fan 2011-06-22 08:41:53 +04:00
parent 32b81e2a72
commit c2042802d4
2 changed files with 2 additions and 4 deletions

View File

@ -68,7 +68,7 @@ var Audio = {
startListener: function() { startListener: function() {
Audio.killListener(); Audio.killListener();
Audio.tid = window.setTimeout(Audio.startListener, 100); Audio.tid = window.setTimeout(Audio.startListener, 300);
Player.updateUI( Player.updateUI(
Audio.getLoadedPercent(), Audio.getLoadedPercent(),
Audio.getPlayedPercent() Audio.getPlayedPercent()

View File

@ -22,7 +22,7 @@ var Player = {
$('.playlist-tracks').sortable(); $('.playlist-tracks').sortable();
}, },
setTrack: function(id) { setTrack: function(id) {console.log(1);
var $obj = $('#i'+ id); var $obj = $('#i'+ id);
var query = $obj.find('.title').text(); var query = $obj.find('.title').text();
var length = $obj.find('.duration').text(); var length = $obj.find('.duration').text();
@ -31,7 +31,6 @@ var Player = {
$('#player .now-playing').html(query); $('#player .now-playing').html(query);
$('.playlist-tracks li').removeClass('now'); $('.playlist-tracks li').removeClass('now');
$obj.addClass('now'); $obj.addClass('now');
Audio.startListener();
$('#player .loaded, #player .played').width(0); $('#player .loaded, #player .played').width(0);
loadTracksData(tmp[0], tmp[1], length, Player.playSource); loadTracksData(tmp[0], tmp[1], length, Player.playSource);
@ -78,7 +77,6 @@ var Player = {
reset: function() { reset: function() {
Audio.pause(); Audio.pause();
Audio.killListener();
$('#player .loaded, #player .played').width(0); $('#player .loaded, #player .played').width(0);
$('#player .now-playing').text('Select track'); $('#player .now-playing').text('Select track');
} }