| Avidemux 2.6 Scripting Reference

- Main Page
- Modules
- Classes
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Functions Enumerations Enumerator Properties Groups Pages
Public Member Functions | Properties | List of all members
SegmentCollection Class Reference

The SegmentCollection class represents a collection of Segment objects that can be individually accessed by index. More...

## Public Member Functions
Number | add (Number startTime, Number duration, Number videoIndex=0)
| Appends a segment of video to the end of the currently open video.
void | clear ()
| Removes all Segment objects from the collection.
Segment | operator[] (Number i)
| Gets the Segment object at the specified index.

## Properties
Number | length
| Returns the number of Segment objects in the collection.
Number | totalDuration
| Returns the total time (in milliseconds) of all video segments in the collection.

## Detailed Description

The SegmentCollection class represents a collection of Segment objects that can be individually accessed by index.

## Member Function Documentation

Number add | ( | Number | startTime,
|  | Number | duration,
|  | Number | videoIndex = `0`
| ) |  |

Appends a segment of video to the end of the currently open video.

The segment starting at the specified time (in milliseconds) and for the specified duration (in milliseconds) is sourced from the first open video unless a video index is specified.

Returns
  Returns the index of the newly added Segment in the collection.