CaptionsCollection
CaptionsCollection class
Represents a collection of the closed captions.
add
| Name | Description |
|---|
| add(String, String) | Adds WebVTT closed captions to the end of the collection. |
Parameters:
| Name | Type | Description |
|---|
| label | String | The label of the closed captions. |
| filePath | String | The path to the WebVTT file. |
Returns:
Captions
Error
| Error | Condition |
|---|
| ArgumentException | Thrown if filePath is empty. |
addFromBytes
| Name | Description |
|---|
| addFromBytes (String, Bytes[]) | Adds WebVTT closed captions to the end of the collection from a stream. |
Parameters:
| Name | Type | Description |
|---|
| label | String | The label of the closed captions. |
| stream | Bytes[] | The input stream containing data in WebVTT format. |
Returns:
Captions
Error
| Error | Condition |
|---|
| ArgumentException | Thrown if the input data is not in WebVTT format. |
clear
| Name | Description |
|---|
| clear() | Removes all closed captions from the collection. |
getCount
| Name | Description |
|---|
| getCount() | Returns the number of elements in the collection. Read-only int. |
Returns:
int
get_Item
| Name | Description |
|---|
| get_Item(int) | Returns the closed captions at the specified index. Read-only ICaptions. |
Returns:
Captions
iterator
| Name | Description |
|---|
| iterator() | Returns an enumerator that iterates through the collection. |
Returns:
remove
| Name | Description |
|---|
| remove(Captions) | Removes the specified closed captions from the collection. |
Parameters:
| Name | Type | Description |
|---|
| captions | Captions | The closed captions to remove. |
removeAt
| Name | Description |
|---|
| removeAt(int) | Removes the closed captions at the specified index. |
Parameters:
| Name | Type | Description |
|---|
| index | int | The index of the closed captions to remove. |