-
-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use autoplay attribute in video tag in Markdown #309
Comments
I just realized that my Update: content/lib/parsers/markdown/handlers/html.js Lines 5 to 13 in 00e6fef
|
The markdown parser parses the video tag as
The double word props are parsed as camel case, so vue render the camel case props into kebab case props and it broke. |
The issue is here:
When the |
#359 should fix this issue for good! |
Version
@nuxt/content: 1.5.0
nuxt: 2.13.0
Reproduction Link
https://codesandbox.io/s/nuxtcontent-demo-p9v26?file=/content/about.md
Steps to reproduce
Basically: Make a video tag that should autoplay inside of a nuxt/content Markdown file. Give it the gif treatment: autoplay, loop, muted, playsinline.
In the codesandbox: Check the about page. The video renders, but doesn't autoplay. Interestingly, since #304 is still an issue, I tested this first with 0.3.0, which had no video autoplay problems. I updated the codesandbox to 1.5.0, and only then did the hyphenation start. So it's only in later versions that this is happening.
What is Expected?
Video tag that looks like this, as it appears in the markdown file, which should autoplay!
What is actually happening?
@nuxt/content seems to be splitting up the attributes, like it does for normal components, which breaks autoplaying.
If I right-click on the video, it's clearly looping and muted, but the dash in the middle of
autoplay
prevents it from actually autoplaying. I haven't tested this yet, but I'm sureplaysinline
getting split up means it won't autoplay on mobile Safari, either.The text was updated successfully, but these errors were encountered: