Videos\Text tracks

Edit a text track

Changed on

This method edits the specified text track.

patch/videos/{video_id}/texttracks/{texttrack_id}

Request

Path parameters

texttrack_idnumber required
Example:12345

The ID of the text track.

video_idnumber required
Example:258684937

The ID of the video.

Request body

activeboolean

Whether the current text track is the active text track, or the one that appears in the player. Only one text track per language and per type can be active.

languagestring

The language of the text track. For a full list of supported languages, use the /languages?filter=texttracks endpoint.

namestring

The name of the text track.

type'captions' | 'chapters' | 'descriptions' | 'metadata' | 'subtitles'

The type of the text track.

Example request

{
  "active": true,
  "language": "en-US",
  "name": "Commentary"
}

Response

The text track was edited.

activeboolean required

Whether this text track is active.

hls_linkstring required

The read-only URL of the text track file, intended for use with HLS playback.

hls_link_expires_timestring required

The time in ISO 8601 format when the read-only HLS playback text track file expires.

languagestring nullable required

The language code for this text track. To see a full list, request /languages?filter=texttrack.

linkstring required

The read-only URL of the text track file. You can upload to this link when you create it for the first time.

link_expires_timestring required

The time in ISO 8601 format when the text track link expires.

namestring nullable required

The descriptive name of this text track.

type'captions' | 'subtitles' nullable required

The type of the text track:

Option descriptions:

  • captions - The text track is for captions.
  • subtitles - The text track is for subtitles.
uristring required

The relative URI of the text track.

Example response

{
  "active": true,
  "hls_link_expires_time": "1494888499",
  "language": "en-US",
  "link_expires_time": "1494888499",
  "name": "English Subtitles",
  "type": "captions",
  "uri": "/videos/258684937/texttracks/12345"
}

Changes