As per Apple documentation autoplay only works if the video is muted. But for some reason on Youtube when I open a video from the homepage, it starts automatically (without touching anything on the screen) with sound. How did Youtube implement this functionality?