SubLib Subtitle Library

SubtitleCollection.AddNewBefore Method 

Creates a subtitle based on the subtitle at the specified index and adds it to the collection, inserting it right before that index.

public bool AddNewBefore(
   int index,
   SubtitleProperties subtitleProperties
);

Parameters

index
The zero-based index before which the subtitle should be inserted.
subtitleProperties
The SubtitleProperties of the subtitles.

Return Value

True if the subtitle could be added, false otherwise.

Remarks

The newly created subtitle's times will be based on the specified subtitle. Its end time will be the start time of the existing subtitle minus MinTimeBetweenSubtitles. Its duration will be MaxSingleLineSubtitleDuration. Both times will be wrapped to zero if they are less than zero.

See Also

SubtitleCollection Class | SubLib Namespace