Adds autoplay functionality.