Update recorder.js

The initEvent method is deprecated. Use event constructors.