Packagecom.adobe.mediacore.timeline
Classpublic final class Placement
InheritancePlacement Inheritance Object

Class which wraps information related to timeline placement. A placement on the timeline can be indicated through an actual time position or through some predefined virtual positions: - PRE_ROLL at the beginning of the timeline - MID_ROLL in the middle of the timeline - POST_ROLL at the end of the timeline The actual time position is mandatory for MID-ROLLS positions. A placement can also indicate that the placement will affect a contiguous interval on the timeline starting for the indicated position. Duration property will indicate the length of the interval.



Public Properties
 PropertyDefined By
  duration : Number
[read-only] The placement duration on the timeline.
Placement
  mode : String
[read-only] The placement mode (insert or replace main content).
Placement
  range : TimeRange
[read-only] Returns the time range associated with this placement.
Placement
  time : Number
[read-only] The placement location on the timeline.
Placement
  type : String
[read-only] The placement type (pre-roll, mid-roll or post-roll).
Placement
Public Methods
 MethodDefined By
  
Placement(type:String, time:Number, duration:Number, mode:String = null)
Default constructor.
Placement
  
compareTo(otherPlacement:Placement):int
Compares this placement to the specified ones.
Placement
  
toString():String
Returns a String representation of the current placement.
Placement
Public Constants
 ConstantDefined By
  UNKNOWN_DURATION : Number = -1
[static] Constant to be used when the duration of the placement is not known.
Placement
  UNKNOWN_TIME : Number = -1
[static] Constant to be used when the time of the placement is not known.
Placement
Property Detail
durationproperty
duration:Number  [read-only]

The placement duration on the timeline. The value indicates the duration in milliseconds of the interval associated with the placement.


Implementation
    public function get duration():Number
modeproperty 
mode:String  [read-only]

The placement mode (insert or replace main content).


Implementation
    public function get mode():String

See also

rangeproperty 
range:TimeRange  [read-only]

Returns the time range associated with this placement.


Implementation
    public function get range():TimeRange
timeproperty 
time:Number  [read-only]

The placement location on the timeline. The value indicates the playhead in milliseconds where the placement will start.


Implementation
    public function get time():Number
typeproperty 
type:String  [read-only]

The placement type (pre-roll, mid-roll or post-roll).


Implementation
    public function get type():String

See also

Constructor Detail
Placement()Constructor
public function Placement(type:String, time:Number, duration:Number, mode:String = null)

Default constructor.

Parameters
type:String — The placement type
 
time:Number (default = NaN) — The location on the timeline where associated with this placement. This value is used only for MID-ROLLs placement and ignored for the others and indicates the playhead in milliseconds.
 
duration:Number (default = NaN) — The duration of the timeline interval which will be associated with this placement in milliseconds.
 
mode:String (default = null) — The placement mode.
Method Detail
compareTo()method
public function compareTo(otherPlacement:Placement):int

Compares this placement to the specified ones.

Parameters

otherPlacement:Placement — the other placement with whom we need to compare.

Returns
int — a negative number, if this placement should appear before the other placement in the sorted sequence 0, if they are equal a positive number, if this placement should appear after the other placement in the sorted sequence
toString()method 
public function toString():String

Returns a String representation of the current placement. All numbers are represented in fixed-point notation with only 2 digits after the decimal point.

Returns
String — a string containing placement information.
Constant Detail
UNKNOWN_DURATIONConstant
public static const UNKNOWN_DURATION:Number = -1

Constant to be used when the duration of the placement is not known.

UNKNOWN_TIMEConstant 
public static const UNKNOWN_TIME:Number = -1

Constant to be used when the time of the placement is not known.