Bill Barnwell
1 min readMar 31, 2017

--

I’ve got a tricky situation that’s kind of related here. We’re implementing a full background video on our site that auto plays. However, on mobile devices video auto-play is disabled, for good reason (so users don’t get their accounts overrun by video downloads). Video will only play on user-initiated action. So, we want to provide a button to start the video playback on mobile devices, however, the detection of mobile by the browser is not based on screen size, it’s based on device. So, in this case we need to use device attributes to determine if this a mobile device as determined by the browser for the purposes of video auto-play so we can show the button. Any thoughts? Has anyone run into this? I supposed what we really need to do is check to see if HTML5 autoplay is supported or not. Has anyone successfully done this on mobile with YouTube iframe embed?

--

--

Bill Barnwell
0 Followers

Co-founder of Meyers Creek Brewing Company