Gallery play() and pause()

Experienced the same problem, would love it if someone could clear up how to make it work.