m_ott’s avatarm_ott’s Twitter Archive—№ 12,545

        1. Serious question: Is there a way to responsibly build a teaser with an autoplaying video background that respects user's bandwidth, esp. on mobile, and shows a fallback image in that case?
      1. …in reply to @m_ott
        Don't want to do user agent sniffing. But: Loading the video based on the screensize is equally unreliable because people still might be on a slow connection. Small screen ≠ slow connection, large screen ≠ fast connection.
    1. …in reply to @m_ott
      Using Navigator.connection to get the current bandwidth is not well supported yet and only works on latest versions of Android but not on iOS, macOS and Windows. caniuse.com/#feat=netinfo
      OpenGraph image for caniuse.com/#feat=netinfo
  1. …in reply to @m_ott
    My last resort is that iOS blocks autoplaying video anyway. Was hoping that there is some sort of best practice or a clever JS solution… 🤔
    1. …in reply to @m_ott
      Well, actually, iOS doesn't block autoplaying video if it has no audio track or if the video has a muted attribute: <video muted>.