API de vídeosGuias
Atualizar legenda
Ligue ou desligue as legendas e estilize o texto delas; o arquivo da faixa em si é somente leitura.
O grupo subtitle liga as legendas, mostra o botão de legenda para o espectador e estiliza o texto das legendas. A faixa em si — o arquivo com as legendas de fato — é somente leitura aqui.
Isto é um merge-patch: envie só as chaves que você quer alterar, e todo o resto mantém o valor salvo.
Estilize as legendas
curl -X PATCH https://api.vturb.com/v1/videos/{id} \
-H "Authorization: Bearer vt_..." \
-H "Content-Type: application/json" \
-d '{ "subtitle": { "enabled": true, "style": { "font_size": "18px", "color": "#FFFFFF", "text_align": "center" } } }'As chaves
| Chave | Tipo | Define |
|---|---|---|
enabled | booleano | Liga ou desliga as legendas |
control | booleano | Mostra o botão de legenda no player |
style.font_size | string | Tamanho da fonte da legenda, por exemplo 18px |
style.color | string | Cor do texto da legenda |
style.background_color | string | Cor atrás do texto da legenda |
style.text_align | string | left, center ou right |
style.show_by_default | booleano | Começa com as legendas visíveis |
track (name, url) e as chaves de layout style.bottom e
style.max_width aparecem no GET, mas são somente leitura — patches nelas são
ignorados.