In order to get a button that pause and play timeline try this JS simple if/else, it worked well for me
if (hypeDocument.isPlayingTimelineNamed('your timeline name'))
hypeDocument.pauseTimelineNamed('your timeline name')
else
hypeDocument.continueTimelineNamed('your timeline name')