TrackItem object
TrackItem object
Section titled “TrackItem object”app.project.sequences[index].audioTracks[index].clips[index]
app.project.sequences[index].videoTracks[index].clips[index]
Description
Section titled “Description”The TrackItem object represents an item on a video or audio track, within a Sequence object.
Attributes
Section titled “Attributes”TrackItem.components
Section titled “TrackItem.components”app.project.sequences[index].audioTracks[index].clips[index].components
app.project.sequences[index].videoTracks[index].clips[index].components
Description
Section titled “Description”The components associated with this trackItem. This can include intrinsic transformations, as well as video and audio effects.
ComponentCollection object, read-only;
TrackItem.duration
Section titled “TrackItem.duration”app.project.sequences[index].audioTracks[index].clips[index].duration
app.project.sequences[index].videoTracks[index].clips[index].duration
Description
Section titled “Description”The duration of the trackItem.
Time object, read-only.
TrackItem.end
Section titled “TrackItem.end”app.project.sequences[index].audioTracks[index].clips[index].end
app.project.sequences[index].videoTracks[index].clips[index].end
Description
Section titled “Description”The visible end time of the trackItem in the sequence, relative to the beginning of its corresponding sequence (NOT the sequence zero point).
Time object, read/write.
TrackItem.inPoint
Section titled “TrackItem.inPoint”app.project.sequences[index].audioTracks[index].clips[index].inPoint
app.project.sequences[index].videoTracks[index].clips[index].inPoint
Description
Section titled “Description”The in point set on the source for this trackItem instance, relative to the beginning of the source.
Time object, read/write.
TrackItem.matchName
Section titled “TrackItem.matchName”app.project.sequences[index].audioTracks[index].clips[index].matchName
app.project.sequences[index].videoTracks[index].clips[index].matchName
Description
Section titled “Description”Add a description
String; read-only.
TrackItem.mediaType
Section titled “TrackItem.mediaType”app.project.sequences[index].audioTracks[index].clips[index].mediaType
app.project.sequences[index].videoTracks[index].clips[index].mediaType
Description
Section titled “Description”The mediaType of media provided by this trackItem.
String, one of:
"Audio"
"Video"
TrackItem.name
Section titled “TrackItem.name”app.project.sequences[index].audioTracks[index].clips[index].name
app.project.sequences[index].videoTracks[index].clips[index].name
Description
Section titled “Description”The name of the track item.
String; read/write.
TrackItem.nodeId
Section titled “TrackItem.nodeId”app.project.sequences[index].audioTracks[index].clips[index].nodeId
app.project.sequences[index].videoTracks[index].clips[index].nodeId
Description
Section titled “Description”Add a description
String.
TrackItem.outPoint
Section titled “TrackItem.outPoint”app.project.sequences[index].audioTracks[index].clips[index].outPoint
app.project.sequences[index].videoTracks[index].clips[index].outPoint
Description
Section titled “Description”The out point set on the source for this TrackItem instance, relative to the beginning of the source.
Time object, read/write.
TrackItem.projectItem
Section titled “TrackItem.projectItem”app.project.sequences[index].audioTracks[index].clips[index].projectItem
app.project.sequences[index].videoTracks[index].clips[index].projectItem
Description
Section titled “Description”The ProjectItem object from which the media is being drawn.
TrackItem.start
Section titled “TrackItem.start”app.project.sequences[index].audioTracks[index].clips[index].start
app.project.sequences[index].videoTracks[index].clips[index].start
Description
Section titled “Description”The visible start time of the trackItem in the sequence, relative to the beginning of its corresponding sequence (NOT the sequence zero point). Note: This may differ from the trackItem’s in point, which is relative to the source.
Time object, read/write.
TrackItem.type
Section titled “TrackItem.type”app.project.sequences[index].audioTracks[index].clips[index].type
app.project.sequences[index].videoTracks[index].clips[index].type
Description
Section titled “Description”The type of media provided by this trackItem.
Number, 1
means video, 2
means audio.
Methods
Section titled “Methods”TrackItem.getMGTComponent()
Section titled “TrackItem.getMGTComponent()”app.project.sequences[index].videotracks[index].getMGTComponent
app.project.sequences[index].audiotracks[index].getMGTComponent
Description
Section titled “Description”Adds an After Effects Motion Graphics Template - a Mogrt - to the selected track at the specified time.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
mogrtPath | String | Full path to a valid .mogrt, created in After Effects |
targetTime | String | The time at which to insert the .mogrt, in ticks |
vidTrackOffset | Integer | The offset from 0 (the first available track), on which to insert video from the .mogrt |
audTrackOffset | Integer | The offset from 0 (the first available track), on which to insert audio from the .mogrt |
Returns
Section titled “Returns”A Component object representing the parameters of the .mogrt, which the creator has exposed.
TrackItem.getSpeed()
Section titled “TrackItem.getSpeed()”app.project.sequences[index].audioTracks[index].clips[index].getSpeed()
app.project.sequences[index].videoTracks[index].clips[index].getSpeed()
Description
Section titled “Description”Returns the speed multiplier applied to the TrackItem.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns the speed multiplier applied to the TrackItem, as a Float. No speed adjustment = 1
.
TrackItem.isAdjustmentLayer()
Section titled “TrackItem.isAdjustmentLayer()”app.project.sequences[index].audioTracks[index].clips[index].isAdjustmentLayer()
app.project.sequences[index].videoTracks[index].clips[index].isAdjustmentLayer()
Description
Section titled “Description”Returns wheter the TrackItem is an adjustment layer.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns true
if the trackitem is an adjustment layer; false
if not.
TrackItem.isSpeedReversed()mm
Section titled “TrackItem.isSpeedReversed()mm”app.project.sequences[index].audioTracks[index].clips[index].isSpeedReversed()
app.project.sequences[index].videoTracks[index].clips[index].isSpeedReversed()
Description
Section titled “Description”Returns whether the trackItem is reversed.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns 1
if TrackItem is reversed; 0
if not.
TrackItem.isSelected()
Section titled “TrackItem.isSelected()”app.project.sequences[index].audioTracks[index].clips[index].isSelected()
app.project.sequences[index].videoTracks[index].clips[index].isSelected()
Description
Section titled “Description”Retrieves the current selection state of the trackItem.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns true
if trackItem is selected; false
if not.
TrackItem.setSelected()
Section titled “TrackItem.setSelected()”app.project.sequences[index].audioTracks[index].clips[index].setSelected(state, updateUI)
app.project.sequences[index].videoTracks[index].clips[index].setSelected(state, updateUI)
Description
Section titled “Description”Sets the selection state of the trackItem.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
state | Integer | If 1 , the track item will be selected; if 0 , it will be deselected. |
updateUI | Integer | If 1 , the Premiere Pro UI will be updated after this function call is made. |
Returns
Section titled “Returns”Returns 0
if successful.
TrackItem.getMatchName()
Section titled “TrackItem.getMatchName()”app.project.sequences[index].audioTracks[index].clips[index].getMatchName()
app.project.sequences[index].videoTracks[index].clips[index].getMatchName()
Description
Section titled “Description”Retrieves the match name for the trackItem.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns the match name as a String if successful.
TrackItem.remove()
Section titled “TrackItem.remove()”app.project.sequences[index].audioTracks[index].clips[index].remove(inRipple, inAlignToVideo)
app.project.sequences[index].videoTracks[index].clips[index].remove(inRipple, inAlignToVideo)
Description
Section titled “Description”Sets the selection state of the trackItem.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
inRipple | Boolean | If 1 , later track items will be moved earlier, to fill the gap; if 0 , later track items will remain in place. |
inAlignToVideo | Boolean | If 1 , Premiere Pro will align moved track items to the start of the nearest video frame. |
Returns
Section titled “Returns”Returns 0
if successful.
TrackItem.disabled
Section titled “TrackItem.disabled”app.project.sequences[index].audioTracks[index].clips[index].disabled
app.project.sequences[index].videoTracks[index].clips[index].disabled
Description
Section titled “Description”Sets the disabled state of the TrackItem. Read/Write.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
newDisableState | Boolean | If true , this TrackItem will be disabled; if false , TrackItem will be enabled. |
Returns
Section titled “Returns”Returns 0
if successful.
TrackItem.move()
Section titled “TrackItem.move()”app.project.sequences[index].audioTracks[index].clips[index].move(newInPoint)
app.project.sequences[index].videoTracks[index].clips[index].move(newInPoint)
Description
Section titled “Description”Moves the inPoint of the track item to a new time, by shifting it by a number of seconds.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
newInPoint | Time object | A Time object that represent the amount of time, in seconds, to shift the track item’s start. |
Returns
Section titled “Returns”Returns 0
if successful.