Autoplay an audio with HTML5 embed tag while the player is invisible

前端 未结 9 2431
时光说笑
时光说笑 2021-02-08 14:07

I want to autoplay a MP3 audio file and I don\'t want the player to be visible.

9条回答
  •  深忆病人
    2021-02-08 14:40

    "Sensitive" era

    Modern browsers today seem to block (by default) these autoplay features. They are somewhat treated as pop-ops. Very intrusive. So yeah, users now have the complete control on when the sounds are played. [1,2,3]

    HTML5 era

    
    

    Early days of HTML

    
    

    References

    1. Jer Noble, New , WebKit, link
    2. Allow or block media autoplay in Firefox, FireFox Help, link
    3. Mounir Lamouri, Unified autoplay, Chromium Blog, link
    4. Embedded content, World Wide Web Consortium, link

提交回复
热议问题