add autoplay logic for mobile