Allow a callback to be passed to pause(), so that code can be executed when it
is certain that playback has been paused.