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
  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)
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
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)

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.
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.