material-design-lite:
When a video element is within a mdl div, such as;
<div class="android-wear-section">
<video class="landing" poster="#" autoplay loop muted>
<source src="costarica.mp4" type="video/mp4" />
<source src="costarica.webm" type="video/webm" />
</video>
</div>
I’ve been able to trace it down to a JS issue with MDL. No avail on a solution though
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 22 (1 by maintainers)
Commits related to this issue
- FIxed the video autoplay described in #1155 — committed to gplanchat/material-design-lite by deleted user 8 years ago
@uplusion23 I spend the same to add MDL not know why, but it solved simply using
I hope this help 😉
Listen for the layout upgrade and then play your video manually.
The work-around to this until V2 ships, don’t use
autoplay
attribute and:Can’t we just add the following code to the project until v2 arrives?
V2 layout won’t affect this at all so the problem will be solved naturally. Projects need to implement this patch listener on their own for V1 as we won’t be adding it into core.
Since there is no action the internal team will take here and there is a reasonable fix for developers within projects that need it, I’m closing this out to keep our open issue list as small as we can get.
Thank you.
I did find a “workaround” after some attempts with JQuery. Waiting 300ms then using JS to play the video allows it to work again.