Abstract position update

This commit is contained in:
Jordan Eldredge 2015-01-28 21:08:39 -08:00
parent 9453f7fae2
commit aa7f2ec362
2 changed files with 7 additions and 3 deletions

View file

@ -213,9 +213,9 @@ MainWindow = {
this.nodes.window.classList.add('closed');
},
updatePosition: function(percent) {
updatePosition: function() {
if(!this.nodes.window.classList.contains('setting-position')) {
this.nodes.position.value = percent;
this.nodes.position.value = this.winamp.getPercentComplete();
}
},
@ -234,6 +234,7 @@ MainWindow = {
updateTime: function() {
this.updateShadePositionClass();
this.updatePosition();
var shadeMinusCharacter = ' ';
if(this.nodes.time.classList.contains('countdown')) {

View file

@ -41,7 +41,6 @@ Winamp = {
this.windowManager.registerWindow(this.mainWindow);
this.media.addEventListener('timeupdate', function() {
self.mainWindow.updatePosition(self.media.percentComplete());
window.dispatchEvent(self.events.timeUpdated);
});
@ -90,6 +89,10 @@ Winamp = {
return this.media.timeElapsed();
},
getPercentComplete: function() {
return this.media.percentComplete()
},
getChannelCount: function() {
return this.media.channels();
},