optimize recording
using timeupdate event
remove debug code
unused setInterval
fix coding style

ref. http://hitode909.hatenablog.com/entry/2013/01/20/182349
Merge pull request #1 from ykzts/optimize-recording

optimize recording