autoloop, fix pause and stop in cordova