117 lines
4.4 KiB
TypeScript
117 lines
4.4 KiB
TypeScript
/**
|
|
* rTube demo page — server-rendered HTML body.
|
|
*
|
|
* Embeds the full <folk-video-player space="demo"> component for
|
|
* real interactivity (video library, search, playback, live streaming)
|
|
* plus showcase sections explaining the rTube vision.
|
|
*/
|
|
|
|
const FEATURES = [
|
|
{
|
|
icon: "\u{1F3AC}",
|
|
title: "Video Library",
|
|
desc: "Browse, search, and play videos from your community's R2-backed storage. Supports MP4, WebM, MOV, and more.",
|
|
},
|
|
{
|
|
icon: "\u{1F4E1}",
|
|
title: "Live Streaming",
|
|
desc: "Broadcast live via RTMP from OBS Studio or any streaming software. Viewers watch in real-time with HLS playback.",
|
|
},
|
|
{
|
|
icon: "\u{1F4E4}",
|
|
title: "Easy Uploads",
|
|
desc: "Authenticated members upload videos directly. Files stream to Cloudflare R2 with automatic format detection.",
|
|
},
|
|
{
|
|
icon: "\u{1F517}",
|
|
title: "Direct Links",
|
|
desc: "Copy shareable links to any video. HTTP range requests enable efficient streaming and seeking.",
|
|
},
|
|
];
|
|
|
|
const INTEGRATIONS = [
|
|
{ icon: "\u{1F4DD}", name: "rNotes", desc: "Attach meeting notes, transcripts, and timestamps to video recordings." },
|
|
{ icon: "\u{1F4C5}", name: "rCal", desc: "Scheduled recordings and live streams appear on the community calendar." },
|
|
{ icon: "\u{1F465}", name: "rNetwork", desc: "Share videos across your network. Collaborative viewing and commenting." },
|
|
{ icon: "\u{1F4DA}", name: "rBooks", desc: "Embed video content in publications and educational materials." },
|
|
{ icon: "\u{1F5FA}", name: "rMaps", desc: "Geotagged videos appear on the map at their recording location." },
|
|
{ icon: "\u2615\uFE0F", name: "rSpace", desc: "Each space has its own video library. Pin videos to the collaborative canvas." },
|
|
];
|
|
|
|
export function renderDemo(): string {
|
|
return `
|
|
<div class="rd-root" style="--rd-accent-from:#ef4444; --rd-accent-to:#ec4899;">
|
|
|
|
<!-- Hero -->
|
|
<section class="rd-hero">
|
|
<div style="display:inline-block;padding:0.375rem 1rem;background:rgba(239,68,68,0.1);border:1px solid rgba(239,68,68,0.2);border-radius:9999px;font-size:0.875rem;color:#fca5a5;font-weight:500;margin-bottom:1.5rem;">
|
|
Community Video Hosting
|
|
</div>
|
|
<h1>rTube Demo</h1>
|
|
<p class="rd-subtitle">Video library, live streaming, and uploads powered by Cloudflare R2</p>
|
|
<div class="rd-meta">
|
|
<span>\u{1F3AC} Video Library</span>
|
|
<span style="color:#475569">|</span>
|
|
<span>\u{1F4E1} Live Streaming</span>
|
|
<span style="color:#475569">|</span>
|
|
<span>\u{1F4E4} Uploads</span>
|
|
<span style="color:#475569">|</span>
|
|
<span>\u{1F517} Direct Links</span>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Interactive Video Player -->
|
|
<section class="rd-section rd-section--narrow">
|
|
<div class="rd-card" style="padding:0;overflow:hidden;">
|
|
<folk-video-player space="demo"></folk-video-player>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Core Concepts -->
|
|
<section class="rd-section">
|
|
<div class="rd-grid rd-grid--2">
|
|
${FEATURES.map(
|
|
(f) => `
|
|
<div class="rd-card" style="padding:1.5rem;">
|
|
<div style="font-size:1.75rem;margin-bottom:0.75rem;">${f.icon}</div>
|
|
<h3 style="font-size:1rem;font-weight:600;color:#e2e8f0;margin:0 0 0.5rem;">${f.title}</h3>
|
|
<p style="font-size:0.875rem;color:#94a3b8;margin:0;line-height:1.5;">${f.desc}</p>
|
|
</div>`,
|
|
).join("")}
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Ecosystem Integrations -->
|
|
<section class="rd-section">
|
|
<h2 style="text-align:center;font-size:1.25rem;font-weight:700;color:#f1f5f9;margin:0 0 1.5rem;">
|
|
r* Ecosystem Integrations
|
|
</h2>
|
|
<div class="rd-grid rd-grid--3">
|
|
${INTEGRATIONS.map(
|
|
(i) => `
|
|
<div class="rd-card" style="padding:1.25rem;">
|
|
<div style="font-size:1.5rem;margin-bottom:0.5rem;">${i.icon}</div>
|
|
<h3 style="font-size:0.875rem;font-weight:600;color:#e2e8f0;margin:0 0 0.375rem;">${i.name}</h3>
|
|
<p style="font-size:0.8rem;color:#94a3b8;margin:0;line-height:1.4;">${i.desc}</p>
|
|
</div>`,
|
|
).join("")}
|
|
</div>
|
|
</section>
|
|
|
|
<!-- CTA -->
|
|
<section class="rd-section rd-section--narrow">
|
|
<div class="rd-cta">
|
|
<h2>Host Your Video Library</h2>
|
|
<p>
|
|
rTube gives your community private video hosting with streaming,
|
|
uploads, and live broadcasting — all powered by Cloudflare R2.
|
|
</p>
|
|
<a href="/create-space" style="background:linear-gradient(135deg,#ef4444,#ec4899);box-shadow:0 8px 24px rgba(239,68,68,0.25);">
|
|
Create Your Space
|
|
</a>
|
|
</div>
|
|
</section>
|
|
|
|
</div>`;
|
|
}
|