
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
gatsby-video
Advanced tools
Gatsby video plugin that consumes video from gatsby-transformer-ffmpeg
A basic video component that consumes gatsby-transformer-ffmpeg
locally hosted videos.
npm install --save gatsby-video gatsby-transformer-ffmpeg gatsby-plugin-ffmpeg
// In your gatsby-config.js
module.exports = {
plugins: [`gatsby-transformer-ffmpeg`],
}
Create a pageQuery or static query to grab the video you're interested in.
export const pageQuery = graphql`
{
file(relativePath: { eq: "features/arc-init.mov" }) {
childVideoFfmpeg {
webm: transcode(
outputOptions: ["-crf 20", "-b:v 0"]
maxWidth: 900
maxHeight: 480
fileExtension: "webm"
codec: "libvpx-vp9"
) {
width
src
presentationMaxWidth
presentationMaxHeight
originalName
height
fileExtension
aspectRatio
}
mp4: transcode(
maxWidth: 900
maxHeight: 480
fileExtension: "mp4"
codec: "libx264"
) {
width
src
presentationMaxWidth
presentationMaxHeight
originalName
height
fileExtension
aspectRatio
}
}
}
}
`
Grab the data in your component and then pass it to the video component.
import { Video } from 'gatsby-video'
import poster_image from './poster.png'
const MainPageVideo = props => {
const videos = props.data.file.childVideoFfmpeg
return (
<Video
poster={poster_image}
autoPlay
muted
loop
sources={[videos.webm, videos.mp4]}
/>
)
}
The video and aspect ratio components are based on these:
FAQs
Gatsby video plugin that consumes video from gatsby-transformer-ffmpeg
The npm package gatsby-video receives a total of 10 weekly downloads. As such, gatsby-video popularity was classified as not popular.
We found that gatsby-video demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.