Closed (outdated)
Project:
Responsive and off-canvas menu
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
20 Sep 2016 at 05:46 UTC
Updated:
10 Jul 2020 at 17:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rroose commentedComment #3
rroose commentedComment #4
tancHi there,
Do you have a site set up publicly where I can see this in action? It sounds like an issue with mmenu rather than this module. Looking at their issues I see this one: https://github.com/FrDH/jQuery.mmenu/issues/162
There doesn't seem to be a fix in the mmenu code, but there is a suggested workaround. For me to test and try this I'll need a basic site with an autoplay video set up. Any chance you can package a D8 site with a database so I can install locally and test? Or provide quick to follow step by step instructions on how to set up a test site with an autoplay video?
Comment #5
rroose commentedHi Tancredi,
I've created a test site just for this issue, see:
http://dev-autoplay.pantheonsite.io/
I've included the files of the dump. If necessary (or easier) I can also add you the Pantheon team for this site.
As soon as I uploaded the mmenu library the videos stopped autoplaying so I think you assessment is correct that the fault lies within this library.
I've sent you the login details in a private message. Let me know if you need anything else!
Comment #6
tancHi @rroose, thanks for setting that up. I was able to replicate the issue and I think I can provide a fix.
The patch adds a small bit of javascript which triggers the playing of videos on the page which have received the canplaythrough event after the DOM has been manipulated by mmenu. This means that autoplay videos which have been paused by the Chrome bug when the DOM manipulation occurs but should be playing will be triggered, and those that are still buffering while the DOM manipulation occurs should naturally autoplay when they are ready. There is also a race condition with setting the event listener but I've worked around that using the video readyState.
Can you please test and let me know whether its working for you? I've checked in Chrome, Firefox, IE11, Edge and Safari and all work as expected.
Comment #7
tancAttached is a better patch which doesn't cause js errors if there is no video on the page.
Comment #8
tancHi @rroose, did you get a chance to test this?
Comment #9
toddses commentedHi @tanc we are having this issue on a site. I'll test the patch and let you know shortly.
Comment #10
toddses commented@tanc the patch did indeed fix the issue. Note that the issue affects the D7 version of the plugin as well, and that's where I tested the fix.
Comment #11
kumkum29 commentedHello,
I reopen this post because the patch don't work for my site.
I use a bootstrap theme, and I have added a wrapper for my page (to resolve a bug with bootstrap). Inside this page wrapper we have the html5 video. On Chrome the video don't launch...
Thanks for your help.
Comment #12
tancComment #13
tancI'm reluctant to maintain browser fixes so I'll close this issue and hope that Chrome have fixed their bug (or maybe feature?). The patch is there so people can use it if they need.