Tutoriales
Añadir subtítulos
1. Ejemplo de subtítulos inline
{
"type": "subtitle",
"start": 0,
"duration": 6,
"words": [
{ "word": "hello", "punctuated_word": "Hello", "start": 0, "end": 0.4 },
{ "word": "world", "punctuated_word": "world!", "start": 0.4, "end": 0.9 }
],
"config": {
"position": "bottom",
"fontSize": 58,
"textColor": "#ffffff",
"highlightColor": "#22d3ee",
"backgroundColor": "rgba(0,0,0,0.45)"
}
}2. Ejemplo de subtítulos basados en assets
{
"assets": {
"subtitles": [
{
"id": "sub-main",
"words": [
{ "word": "hello", "punctuated_word": "Hello", "start": 0, "end": 0.4 },
{ "word": "world", "punctuated_word": "world!", "start": 0.4, "end": 0.9 }
]
}
]
}
}Úsalo así:
{
"type": "subtitle",
"start": 0,
"duration": 6,
"words": { "$ref": "sub-main" },
"config": {
"position": "bottom",
"fontSize": 58,
"highlightColor": "#22d3ee"
}
}3. JSON remoto de subtítulos
{
"type": "subtitle",
"start": 0,
"duration": 6,
"words": {
"src": "https://example.com/subtitle.json"
}
}4. Consejos prácticos
- Alinea la duración de los subtítulos con el segmento hablado
- Mantén suficiente padding inferior para las zonas seguras en móvil
- Prefiere
$refcuando los mismos subtítulos se reutilicen en varias plantillas o ejemplos
5. Documentos relacionados
- Elemento de subtítulos: Elemento de subtítulo
- Colección de ejemplos: Ejemplos