finish autoplay and fix jslint errors