Files
react-website/src/site/demos/DemoPlayer.tsx
T
MehboobKandClaude Sonnet 5 63a36e0dca Initial commit: BlackDice site rebuild with integrated CMS
Rebuilds content management around a single admin route (/admin —
"BlackDice Studio"), replacing blackdice-studio.html. Publishing writes
one JSON content document instead of regenerating HTML files, so it can
no longer overwrite hand-made site changes the way the old tool did.

- /admin: click-to-edit copy/images, article CRUD with a Word-safe rich
  text editor, demo clip management, per-page SEO, enquiry log, publish
  history with rollback
- Real per-page URLs for all pages and articles, each with its own
  meta/canonical/OG/JSON-LD
- Newsroom + article pages driven by the CMS post library, seeded from
  the old studio's export (17 articles) plus a drafted GSMA Open Gateway
  press release awaiting approval
- Demo sections on Mobile SDK and Halo CPE, interactive by default and
  upgradable to an uploaded clip per slot
- Dependency-free Node API server (auth, publish, uploads, snapshots,
  leads, live sitemap)
- Deployment configs for Node/nginx/IIS, Vercel and Netlify

See docs/ARCHITECTURE.md, docs/PROJECT-STRUCTURE.md, docs/CMS-GUIDE.md
and docs/DEPLOYMENT.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 23:52:44 +05:00

31 lines
1.0 KiB
TypeScript

import type { DemoSlot } from '../../cms/types'
/**
* A CMS-configured demo clip. Renders nothing until a video has been uploaded in
* /admin → Demos, so a page never shows an empty player.
*/
export default function DemoPlayer({ slot, compact = false }: { slot?: DemoSlot; compact?: boolean }) {
if (!slot || !slot.enabled || !slot.video) return null
return (
<figure className={`bd-demo-clip${compact ? ' compact' : ''}`}>
<div className="dash-frame bd-demo-frame">
<video
controls
playsInline
preload="none"
poster={slot.poster || undefined}
style={{ display: 'block', width: '100%', height: 'auto', background: '#010e14' }}>
<source src={slot.video} />
Your browser cannot play this clip.
</video>
</div>
{slot.title || slot.caption ? (
<figcaption>
{slot.title ? <strong>{slot.title}</strong> : null}
{slot.caption ? <span>{slot.caption}</span> : null}
</figcaption>
) : null}
</figure>
)
}