Hey guys!
I’ve finally (after months) figured out how to get vimeo videos for portfolio to auto play and loop with zero UI and it’s great.
Problem is in mobile – it’s just static and you can’t play. I understand vimeo can’t autoplay on mobile (? this true?)
So my question is:
How do I change the embed code for all vimeo embeds to be one thing for desktop, and another for mobile?
ie:
Desktop:
<iframe src=”https://player.vimeo.com/video/xxxxxxxxx?autoplay=1&quality=1080p&background=1&loop=1&color=ffffff&title=0&byline=0&portrait=0&” width=”940″ height=”627″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>
Mobile:
<iframe src=”https://player.vimeo.com/video/xxxxxxxxx?loop=1&color=ffffff&title=0&byline=0&portrait=0&” width=”940″ height=”627″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>
Only change is taking out autoplay and background tags.
Thanks!