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.

addFromStream

NameDescription
addFromStream (CaptionsCollection, String, ReadStream, Function)Adds WebVTT closed captions to the end of the collection from a stream.

Parameters:

NameTypeDescription
captionscollectionCaptionsCollectionlink to self
labelStringThe label of the closed captions.
streamReadStreamThe input stream containing data in WebVTT format.
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

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.