Pong sampler for HTML5/JS applications