HTML5 video autoplay not working in chrome

后端 未结 3 1802
南方客
南方客 2021-01-24 02:23

I am trying to show a video in my slider using a html5 video. This works fine with the controls parameter (showing controls). But when I add autoplay i

3条回答
  •  情话喂你
    2021-01-24 02:54

    As per Google's latest policies, Muted videos can autoplay in Chrome. Autoplay with sound is allowed if:

    • User has interacted with the domain (click, tap, etc.).
    • On desktop, the user's Media Engagement Index threshold has been crossed, meaning the user has previously play video with sound.
    • On mobile, the user has [added the site to their home screen].

    Top frames can delegate autoplay permission to their iframes to allow autoplay with sound.

    Also, put the following tag after your tag:-

    
    

    See, if it works now.

    Check more about Google autoplay policy changes on:- https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

提交回复
热议问题