CaptionsCollection

CaptionsCollection class

Represents a collection of the closed captions.

add

NameDescription
add(String, String)Adds WebVTT closed captions to the end of the collection.

Parameters:

NameTypeDescription
labelStringThe label of the closed captions.
filePathStringThe path to the WebVTT file.

Returns: Captions

Error

ErrorCondition
ArgumentExceptionThrown if filePath is empty.

addFromBytes

NameDescription
addFromBytes (String, Bytes[])Adds WebVTT closed captions to the end of the collection from a stream.

Parameters:

NameTypeDescription
labelStringThe label of the closed captions.
streamBytes[]The input stream containing data in WebVTT format.

Returns: Captions

Error

ErrorCondition
ArgumentExceptionThrown if the input data is not in WebVTT format.

clear

NameDescription
clear()Removes all closed captions from the collection.

getCount

NameDescription
getCount()Returns the number of elements in the collection. Read-only int.

Returns: int


get_Item

NameDescription
get_Item(int)Returns the closed captions at the specified index. Read-only ICaptions.

Returns: Captions


iterator

NameDescription
iterator()Returns an enumerator that iterates through the collection.

Returns:


remove

NameDescription
remove(Captions)Removes the specified closed captions from the collection.

Parameters:

NameTypeDescription
captionsCaptionsThe closed captions to remove.

removeAt

NameDescription
removeAt(int)Removes the closed captions at the specified index.

Parameters:

NameTypeDescription
indexintThe index of the closed captions to remove.