play or pause the player when the spacebar is pressed