Composition Object

Document created by DPM Admin Employee on Jul 21, 2017Last modified by Trishala Kalal on Aug 14, 2017
Version 2Show Document
  • View in full screen mode

Represents the Composition itself.

Composition Properties

  • name (read only – string)

The name property of the Composition object is read-only; however, the name property for any item in a composition is writable and can be changed via script.

The following restrictions apply:

    • The name can only be changed before any activity has occurred for the given item. The item cannot have started playing yet, cannot have started repeating yet, and no other actions for it can have occurred yet (e.g. no other properties of it can have been set).
    • The name specified by the script must, of course, be a legal item name (255 chars max, no square brackets or slashes), and must not be the same name as another item in the same container.

Example: name (string)

This property is writable for the following items in a composition: band, track, clip, chain, checkpoint, delay, script, message, browseraction, and target.

  • parent (read only – object)

Always null.

  • propertyList (read only – object)

A PropertyList object that allows access to all of the Custom Properties contained in this object.

  • systemPropertyList (read only – object)

A systemPropertyList object that allows access to all of the System Properties contained in this object.

  • type (read only – string)

The string "Composition".

  • children (read only – array of objects)

An array of Band objects representing all of the Bands in the Composition.

  • index (read only – integer)

Always returns -1 for Compositions.

  • nextItem (read only – object)

Always returns null for Compositions.

  • previousItem (read only – object)

Always returns null for Compositions.

  • forEachValue (read only – string, number, date/time, or null)

Always returns null for Compositions.

  • repeatIndex (read only – integer)

Always -1 for Compositions.

    • playNumber (read only – integer)

      Always 0 for Compositions.

      • playNumberBeforeRenewal (read only – integer)

      If this item repeats in parallel with the “Renew parallel repeats” option enabled, this is an integer value that is the “playNumber” value of the original parallel repeat for this item if it has been renewed because a prior parallel repeat ended. If this is the original parallel repeat, the value of playNumberBeforeRenewal will be equal to the value of playNumber. If this item does not repeat in parallel, the value will be zero.

      For example, if parallel repeat number 5 of the item ends, but the Renew parallel repeats checkbox is enabled, the ending repeat will be replaced with a new, replacement repeat. The new repeat will have new repeatIndex and playNumber values (according to how many other repeats have already occurred). However, the playNumberBeforeRenewal value will still be 5 in this example.

      This property is always 0 for Composition, Checkpoint, Delay, and Target.

      • isPreviewMode (read only – boolean)

      True if the Composition is being played in Preview mode.

Composition Methods

abort Method

 

void abort(Object message, Object details)

Terminates the Composition as if there were an error.  The message and detail text given in the parameters are inserted into the Result object. Example:


$context.composition.abort("Message text from script",
"Details\nfrom\nscript");

stop Method

Stops the Composition, as if the user had pressed the "stop" button.


void stop()

getChild Method

Returns a specific Band within the Composition by name, or null if there is no Band with the specified name.


object getChild(string childName)

getItemViaPath

Given a type of item and the path to that item in the Composition object hierarchy, returns the object in the hierarchy that represents that item.

The "itemType" parameter value indicates the type of item (not case sensitive):

  • "Composition"
  • "Band"
  • "Track"
  • "Clip"
  • "Chain"
  • "Message"
  • "Browser Action"
  • "Delay"
  • "Checkpoint"
  • "Target"

The "path" parameter contains a path as specified for In Situ Substitution Expressions.  The path can be relative to the current item (for example to specify another item in the same Clip, the Band, Track and Clip portions of the path can be omitted).


object getItemViaPath(string itemType, string path)

rampPause

Pauses the Composition’s “ramp up”, if any, as if the user had pressed the “pause ramp” button. Note that this merely starts the ramp pausing. The ramp will not actually be completely paused until all portions of the Composition on all servers have paused the ramp.

This method may be called at any time, including when the ramp up is already paused or pausing, or when it is resuming.

“Ramp up” is defined as Track parallel repeating with an “interval”.

void rampPause()

rampResume

Resumes the Composition’s “ramp up”, if any, as if the user had pressed the “resume ramp” button. Note that this merely starts the ramp resuming. The ramp will not actually be completely resumed until all portions of the Composition on all servers have resumed the ramp.

This method may be called at any time, including when the ramp up is already paused or pausing, or when it is resuming.

“Ramp up” is defined as Track parallel repeating with an “interval”.

Attachments

    Outcomes