autoplay and ended eventlistener added