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

Exception

ErrorCondition
ArgumentExceptionThrown if filePath is empty.

add

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

Parameters:

NameTypeDescription
labelStringThe label of the closed captions.
streamInputStreamThe input stream containing data in WebVTT format.

Returns: Captions

Exception

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

clear

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

Returns: void


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.

Returns: void


removeAt

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

Parameters:

NameTypeDescription
indexintThe index of the closed captions to remove.

Returns: void