text tracks

Create a text track

Changed on

Generate a text track for the associated media. Each media can have a maximum of 50 text tracks.

post/v2/sites/{site_id}/media/{media_id}/text_tracks/

Request

  • Base URL
    https://api.jwplayer.com
  • URL
    https://api.jwplayer.com/v2/sites/{site_id}/media/{media_id}/text_tracks/
  • Auth
    API key in header Authorization

Path parameters

site_idstring required

Unique identifier for a resource

Example:Ny05CEfj

Unique alphanumeric ID of the site

media_idstring required

Unique identifier for a resource

Example:Ny05CEfj

Unique alphanumeric ID of the media

Request body

Example request

{
  "metadata": {
    "track_kind": "captions"
  }
}

Response

Resource successfully created

schemastring
idstring

Unique identifier for a resource

createdstring

Date and time at which the resource was created

last_modifiedstring

Date and time at which the resource was most recently modified

typestring

Name of the type of resource.

relationshipsobject

Ancilliary resources associated to the primary resource being read

delivery_urlstring

URL to access the text track This URL is only returned when the text track status is ready or draft.

error_messagestring

A human-readable error message for describing upload failures

track_kind'captions' | 'chapters' | 'descriptions' | 'metadata' | 'subtitles'

Kind of text track This corresponds with the HTML <track> element kind attribute.

upload_linkstring

Presigned S3 link for uploading a track

Example response

{
  "schema": "https://schema.jwplayer.com/types/thumbnail.json",
  "id": "Ny05CEfj",
  "created": "2019-09-25T15:29:11.042095+00:00",
  "last_modified": "2019-09-25T15:29:11.042095+00:00",
  "track_kind": "captions"
}

Changes

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status