Skip to content

Commit

Permalink
Added Track object
Browse files Browse the repository at this point in the history
Minor updates, throughout.
  • Loading branch information
bbb committed Feb 27, 2018
1 parent 388cdb5 commit c5e6988
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 0 deletions.
1 change: 1 addition & 0 deletions 5 - Sequence object/sequence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ Set the starting time of the sequence.
**Parameters**

An integer, specifying the new zero point, in Ticks.

**Type**

Integer; read-only.
Expand Down
194 changes: 194 additions & 0 deletions 6 - Track object/track.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
.. highlight:: javascript

.. _track:

Track object
===================

``Track``

**Description**

The **Track** object represents a video or audio track, within a sequence.

----

==========
Attributes
==========

.. _track.name:

name
*********************************************

``track.name``

**Description**

The name of the track.

**Type**

String; read-only.


----

.. _track.id:

id
*********************************************

``track.id``

**Description**

This is the ordinal assigned to the track, upon creation.

**Type**

Integer, read-only.

----

.. _track.mediaType:

mediaType
*********************************************

``track.mediaType``

**Description**

The type of media, contained in this track.

**Type**

String, read-only; valid values are ``Audio`` and ``Video``.


----

.. _track.clips:

clips
*********************************************

``track.clips``

**Description**

An array of clip objects, contained within the track, in temporal order.

**Type**

Array; read-only.

----

.. _track.transitions:

transitions
*********************************************

``track.transitions``

**Description**

An array of transitions objects, contained within the track, in temporal order.

**Type**

Array; read-only.




=======
Methods
=======


.. _track.isMuted:

isMuted()
*********************************************

``track.isMuted()``

**Description**

Retrieves the current mute state, of the track.

**Parameters**

None.

**Returns**

Returns **true** if track is currently muted; **false** if not.

----


.. _track.setMute:

setMute()
*********************************************

``track.setMute(isMuted)``

**Description**

Sets the mute state, of the track.

**Parameters**

Integer; if **1**, mute the track. If ``isMuted`` is **0**, the track will be unmuted.

**Returns**

Returns 0 if successful.

----

.. _track.insertClip:

insertClip()
*********************************************

``track.insertClip(srcProjectItem, time)``

**Description**

Adds a 'clip' (media segment from a projectItem) to the track, at the specified time. Media will be inserted, at that time.

**Parameters**

A ``projectItem`` from which to get media, and the time at which to add it, in Ticks.

**Returns**

Returns 0 if successful.

----

.. _track.overwriteClip:

overwriteClip()
*********************************************

``track.overwriteClip(srcProjectItem, time)``

**Description**

Adds a 'clip' (media segment from a projectItem) to the track, at the specified time. This will overwrite any existing media, at that time.

**Parameters**

A ``projectItem`` from which to get media, and the time at which to add it, in Ticks.

**Returns**

Returns 0 if successful.
6 changes: 6 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ Welcome to the Premiere Scripting Guide!
:caption: Chapter 5 - Sequence object

5 - Sequence object/sequence

.. toctree::
:maxdepth: 2
:caption: Chapter 6 - Track object

6 - Track object/track

0 comments on commit c5e6988

Please sign in to comment.