HTML and CSS Reference
In-Depth Information
track.callbacks.didPause = function(){
_self.draw();
}
/**
* Track controls
*/
this.togglePlay = function(){
switch(track.getState()){
case track.state.STOPPED:
case track.state.PAUSED:
_self.play();
break;
case track.state.PLAYING:
_self.stop();
break;
}
}
this.play = function(){
track.play();
};
this.stop = function(){
track.pause();
};
this.drawStop = function(){
var width = 20,
height = 20,
x = canvas.center.x - (width / 2),
y = canvas.center.y - (height / 2);
context.beginPath();
context.fillStyle = '#A0A0A0';
context.fillRect(x, y, width, height);
};
this.drawPlay = function(){
var width = 20,
height = 20,
x = canvas.center.x - (width / 2),
y = canvas.center.y - (height / 2);
context.beginPath();
context.moveTo(x, y);
Search WWH ::




Custom Search