[JS] HTML5 Video Tag cannot autoplay with MMenu.js in Chrome

I recently found this weird bug of MMenu.js in Chrome. Having spent hours of searching and testing, I would like to share my solution here.

The reason is that Chrome start playing autoplay video before onDocumentReady event, thus Mmenu cause a bug to stop video from autoplay.

The fix is surprisingly easy (but I found it after 3 hours of trying), just wrap everything in a single <div>…</div> and it is solved.

Reference: https://github.com/FrDH/jQuery.mmenu/issues/162

Leave a Reply

Your email address will not be published. Required fields are marked *