Skip to content

Commit d86cf37

Browse files
committed
stream link
1 parent 104e7b1 commit d86cf37

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

src/content.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ const meetups = defineCollection({
7575
map_url: z.string().url().nullable().optional(),
7676
}),
7777
stream_url: z.string().url().nullable().optional(),
78+
embed_stream: z.boolean().optional().default(false),
7879
registration_url: z.string().url().nullable().optional(),
7980
speakers: z.array(meetupSpeakerSchema).optional(),
8081
schedule: z.array(scheduleItemSchema).optional(),

src/pages/meetups/[slug].astro

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const folderPhotos = photos.filter((photo) => photo.type === 'folder');
8282
</div>
8383

8484
<!-- ── Live: stream embed ─────────────────────────────── -->
85-
{status === 'live' && d.stream_url && (
85+
{status === 'live' && d.stream_url && d.embed_stream && (
8686
<div class="stream-section">
8787
<div class="container">
8888
<span class="eyebrow live-eyebrow">● Streaming now</span>
@@ -97,6 +97,16 @@ const folderPhotos = photos.filter((photo) => photo.type === 'folder');
9797
</div>
9898
</div>
9999
)}
100+
{status === 'live' && d.stream_url && !d.embed_stream && (
101+
<div class="stream-section">
102+
<div class="container">
103+
<span class="eyebrow live-eyebrow">● Streaming now</span>
104+
<a href={d.stream_url} target="_blank" rel="noopener noreferrer" class="btn btn-primary btn-stream-link">
105+
Watch live →
106+
</a>
107+
</div>
108+
</div>
109+
)}
100110

101111
<!-- ── Upcoming: registration CTA ────────────────────── -->
102112
{status === 'upcoming' && d.registration_url && (
@@ -123,14 +133,31 @@ const folderPhotos = photos.filter((photo) => photo.type === 'folder');
123133
<span class="eyebrow">About</span>
124134
<p class="about-desc">{d.description}</p>
125135
</div>
126-
{status === 'past' && d.stream_url && (
136+
{status === 'past' && d.stream_url && !d.embed_stream && (
127137
<a href={d.stream_url} target="_blank" rel="noopener noreferrer" class="btn btn-outline">
128138
Watch recording →
129139
</a>
130140
)}
131141
</div>
132142
</div>
133143

144+
{status === 'past' && d.stream_url && d.embed_stream && (
145+
<div class="stream-section">
146+
<div class="container">
147+
<span class="eyebrow">Recording</span>
148+
<div class="stream-wrap card">
149+
<iframe
150+
src={d.stream_url}
151+
title={`${d.name} — Recording`}
152+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
153+
allowfullscreen
154+
loading="lazy"
155+
></iframe>
156+
</div>
157+
</div>
158+
</div>
159+
)}
160+
134161
<!-- ── Speakers ───────────────────────────────────────── -->
135162
{d.speakers && d.speakers.length > 0 && (
136163
<div class="speakers-section">
@@ -357,6 +384,7 @@ const folderPhotos = photos.filter((photo) => photo.type === 'folder');
357384
.live-eyebrow { color: var(--pink); }
358385
.stream-wrap { overflow: hidden; margin-top: var(--s5); box-shadow: 8px 8px 0 var(--pink); }
359386
.stream-wrap iframe { width: 100%; aspect-ratio: 16/9; border: none; display: block; }
387+
.btn-stream-link { margin-top: var(--s5); }
360388

361389
/* ── Registration ────────────────────────────────────── */
362390
.reg-section { padding-block: var(--s8); border-bottom: 2px solid var(--black); background: var(--yellow); }

0 commit comments

Comments
 (0)