I feel kind of stupid for wasting people's time with questions that might be trivial, but I'm about to give up and turn to you guys once again.
I think the below looks pretty decent, but it's not currently working as expected (pausing/unpausing (is that even a word?) itself works, but not the restart action). Clicking the stop button will close the app (with the close browser action), but it will still run in the background. Is there no other option? I guess I can live with that.
The "rewind" button is a bit more worrying. Clicking it simply gives me a black screen, this happens both during testing in the browser and when installed on my device. I don't understand why.
(I'm using a global variable Pause to enable/disable pausing.)