In the JS engine the variable 'play_state' seems to ignore the pause button.
transport stopped -> click pause -> play_state=0 (According to the
JS reference it should be 2)
transport play -> click pause -> play_state=1 (should be 2)
transport record -> click pause -> play_state=5 (should be 6)
(REAPER 3.11)
In the bug tracker:
http://forum.cockos.com/project.php?issueid=2226