Documentation

MediaTrack
in package

MediaTrack Object

Represents a media track (caption/subtitle) associated with a MediaObject

Table of Contents

Properties

$content  : string|null
The SRT format content of the track
$createdAt  : string|null
When the track was created
$id  : int|null
The Canvas ID of the media track
$kind  : string|null
The type of track (subtitles, captions, descriptions, chapters, metadata)
$locale  : string|null
The language/locale code for the track (e.g., "en", "es", "fr")
$mediaObjectId  : string|null
The media object ID this track belongs to
$updatedAt  : string|null
When the track was last updated
$url  : string|null
The URL to access the track
$userId  : int|null
The ID of the user who created the track
$webvttContent  : string|null
The WEBVTT format content of the track

Methods

__construct()  : mixed
Constructor
toArray()  : array<string, mixed>
Convert the object to an array

Properties

$content

The SRT format content of the track

public string|null $content = null

$createdAt

When the track was created

public string|null $createdAt = null

$id

The Canvas ID of the media track

public int|null $id = null

$kind

The type of track (subtitles, captions, descriptions, chapters, metadata)

public string|null $kind = null

$locale

The language/locale code for the track (e.g., "en", "es", "fr")

public string|null $locale = null

$mediaObjectId

The media object ID this track belongs to

public string|null $mediaObjectId = null

$updatedAt

When the track was last updated

public string|null $updatedAt = null

$url

The URL to access the track

public string|null $url = null

$userId

The ID of the user who created the track

public int|null $userId = null

$webvttContent

The WEBVTT format content of the track

public string|null $webvttContent = null

Methods

__construct()

Constructor

public __construct([array<string, mixed> $data = [] ]) : mixed
Parameters
$data : array<string, mixed> = []

The data to populate the object

toArray()

Convert the object to an array

public toArray() : array<string, mixed>
Return values
array<string, mixed>

        
On this page

Search results