Composant · A11y & médias
Transcription
DocumentéTranscription regroupe les extraits transcrits d’une vidéo/audio dans un bloc
accessible, avec options horodatage et speaker.
Présentation
Transcription
Transcription
-
Bienvenue dans cette démo de composant Transcription.
-
Le composant affiche une transcription verticale avec horodatage.
Voir le code (Svelte)
<Transcription
title="Transcription"
open
segments={[{"speaker":"Narrateur","startTime":"00:00","endTime":"00:12","text":"Bienvenue dans cette démo de composant Transcription."},{"speaker":"Intervenant","startTime":"00:12","endTime":"00:24","text":"Le composant affiche une transcription verticale avec horodatage."}]}
/>L’accordéon est ouvert (open) pour la démonstration.
API
| Prop | Type | Défaut | Effet |
|---|---|---|---|
title | string | "Transcription" | Libellé visible dans l’en-tête repliable |
segments | TranscriptionSegment[] | [] | Liste ordonnée des lignes |
text | string | aucun texte | Fallback texte brut quand segments absent |
open | boolean | false | État initial de l’accordéon |
showTimestamps | boolean | true | Affiche startTime/endTime |
Accessibilité
- Le conteneur repose sur
<details>et<summary>pour un comportement clavier natif. - Le texte vide affiche un message de fallback explicite.
- Les horodatages sont lisibles visuellement et restitués en contexte texte.