js/playsounds.js: Use timeout instead of buisy waiting