teqo-backup/src/components/campaign/reels/ReelPlayer.tsx
Francisco Solla 7e164b637d fix(C194): port fiel ao artefato após crítica do designer (#1153)
- player mobile 226px (CTA do detalhe acima da dobra), 330px a partir de lg
- painel de downloads no mobile: CTA primário primeiro, 'Outros arquivos' depois
- cards mobile só com título/funcionalidade; data e 'Abrir reel' a partir de lg
- despublicado: aviso + publicação antes da mídia bloqueada; 'Sobre o reel' depois
- feature sem '(#cards)' na UI e data de publicação só com o dia
- 'Abrir reel' aria-hidden (o card inteiro é o link)

Design tier: openai/gpt-5.6-sol — crítica final certificada (v3, 10 capturas).
2026-09-18 21:54:37 -03:00

29 lines
1.1 KiB
TypeScript

import type { ReelDetailViewModel } from '@/lib/reel'
/**
* C194 — the 9:16 player. The source prefers the rough cut with narration
* (`video-audio`) and falls back to the silent primary video; while the reel is
* unpublished there is no source at all and the player states why (C193 kill
* switch withholds every file).
*/
export const ReelPlayer = ({ reel }: { reel: ReelDetailViewModel }) => {
if (!reel.videoSourceUrl) {
return (
<div className="mx-auto flex aspect-[9/16] w-full max-w-[226px] flex-col items-center justify-center gap-1 rounded-xl border border-dashed bg-muted/40 p-4 text-center lg:max-w-[330px]">
<span className="text-sm font-medium">Player indisponível</span>
<p className="text-xs text-muted-foreground">{reel.mediaBlockedLabel}</p>
</div>
)
}
return (
<video
controls
playsInline
preload="metadata"
poster={reel.videoPosterUrl}
src={reel.videoSourceUrl}
className="mx-auto aspect-[9/16] w-full max-w-[226px] rounded-xl border bg-black lg:max-w-[330px]"
/>
)
}