Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
astro-lazy-youtube-embed
Advanced tools
Embed YouTube videos with a static placeholder which only embeds when you click
Lazily embed YouTube videos with a static placeholder using the <iframe>
srcdoc
attribute, which looks like the YouTube embed (at the the time of writing) but doesn't actually embed until you click.
npm i astro-lazy-youtube-embed
Use embedParams
to pass YouTube IFrame Player API parameters for the embed, e.g. to set start & stop times to play a particular section when clicked.
Use thumbnailRes
to control the resolution of the thumbnail used for the placeholder.
---
import {YouTube} from 'astro-lazy-youtube-embed'
---
<YouTube
title="Just Curious - Limmy's Homemade Show"
videoId="FfTT7mxGw8I"
/>
<div class="my-8">Configure the embed features and thumbnail size:</div>
<YouTube
embedParams={{start: 19, end: 22}}
thumbnailRes="maxres"
title="Frimmerang"
videoId="xptCWoB_VCE"
/>
<div class="my-8">Pass other HTML attributes for the <code><iframe></code>:</div>
<YouTube
class="rounded-2xl"
id="techno"
title="Limmy Teaches Techno - Limmy's Homemade Show"
videoId="L0C5nyOVTzc"
/>
FAQs
Embed YouTube videos with a static placeholder which only embeds when you click
The npm package astro-lazy-youtube-embed receives a total of 47 weekly downloads. As such, astro-lazy-youtube-embed popularity was classified as not popular.
We found that astro-lazy-youtube-embed demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.