-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support for embedded MP4s #75
Comments
Experimenting in this PR: #76 I tried adding this plugin: https://www.gatsbyjs.com/plugins/gatsby-remark-video/ And using it to embed a test MP4 in markdown via the syntax described in the link above, but it just results in the code being printed to the page like:
It also doesn't put |
@paul121 found this: https://www.gatsbyjs.com/plugins/gatsby-remark-videos/ It appears to be actively maintained, and purports to do exactly what I want. However, it requires a higher version of Gatsby than we are using:
Curious if we can update Gatsby... but that should be a separate issue IMO. |
We talked about this on the dev call today and realized there are two separate issues/requests here:
It seems like gatsby-remark-videos can solve 1, but it states on the plugin page that you need another plugin to solve 2:
So maybe we can just use gatsby-remark-copy-linked-files and manually add I'll give that a try in my PR. |
Bah! gatsby-remark-copy-linked-files requires Gatsby 5+ too!
|
Chatted about this with @jgaehring - copying some of his thoughts here...
...
|
Ah another thing I just learned: I'm going to focus on problem 2 (copying the MP4 file during build) first. |
OK! I was able to install Only problem now is that it's too big: I imaging |
Hmm for some reason I can't get This is the markdown:
And this is the output:
The good news is the MP4 actually works when you navigate to it directly! |
Manually adding |
I opened this pull request to add I think that is all that's needed in order to merge the blog pull request that motivated all of this: farmOS/farmOS-community-blog#16 We can consider adding |
These two PRs have been merged, which serve as a first step (MVP) for supporting embedded MP4s:
I will leave this open for now so we can consider adding |
I was trying to embed MP4 files in a blog post PR (farmOS/farmOS-community-blog#16) and had trouble getting it to work. That PR is against the farmOS-community-blog repo, not this one, but this repository is responsible for converting those blogs posts into HTML files, so I think this is the right place for this issue.
I first attempted to embed the MP4 in the same way we embed images, like:
... but that caused a build error:
Full log: https://app.netlify.com/sites/farmos-community-blog-preview/deploys/646286a3eb759b0008fb9494
Then I tried with a
<video>
tag:... that went through the build process successfully, but MP4 file itself is not being copied into the build output, so it results in a 404 on the MP4 files and a blank area in the blog post where they would have been embedded.
Do we need to add a Gatsby.js plugin, or configure something differently, to make this possible?
The text was updated successfully, but these errors were encountered: