add infinite loop support for autoplay