added a toggle function to toggle playback.
Merge pull request #6 from voldyman/master

added a toggle function to toggle playback.