using ajax to play/pause