Added functionality to detect space bar as a play/pause toggle button.