public class CuePoint extends MetadataObject implements java.lang.Comparable<CuePoint>
| Modifier and Type | Class and Description |
|---|---|
static class |
CuePoint.CuePointType
Specifies the cue point type.
|
static class |
CuePoint.PositionType
Indicates the position of the cue point in relation to the entire video.
|
properties, TAG| Constructor and Description |
|---|
CuePoint(CuePoint.PositionType positionType,
CuePoint.CuePointType type,
java.util.Map<java.lang.String,java.lang.Object> properties)
Used to create a pre-roll (PositionType.BEFORE) or post-roll (PositionType.AFTER) cue point.
|
CuePoint(CuePoint.PositionType positionType,
java.lang.String type,
java.util.Map<java.lang.String,java.lang.Object> properties)
Deprecated.
Use the construtor that use a CuePointType rather than a string. This
will guarantee that the CuePoint is of a known type and can be handled
properly by the system. This method now throws IllegalArgumentException
if the string value describing the cue point type does not specify a
known cue point type. Currently supported values are "AD" or "CODE".
|
CuePoint(int position,
CuePoint.CuePointType type,
java.util.Map<java.lang.String,java.lang.Object> properties)
Used to create a mid-roll (PositionType.POINT_IN_TIME) cue point at a specific position.
|
CuePoint(int position,
java.lang.String type,
java.util.Map<java.lang.String,java.lang.Object> properties)
Deprecated.
Use the construtor that takes a CuePointType rather than a string. This
will guarantee that the CuePoint is of a known type and can be handled
properly by the system. This method now throws IllegalArgumentException
if the string value describing the cue point type does not specify a
known cue point type. Currently supported values are "AD" and "CODE".
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CuePoint cuePoint)
Compares this CuePoint object with the specified CuePoint object.
|
boolean |
equals(java.lang.Object object) |
CuePoint.CuePointType |
getCuePointType() |
int |
getPosition()
Returns the time offset of the cue point from the beginning of the video, in milliseconds.
|
CuePoint.PositionType |
getPositionType() |
java.lang.String |
getType()
Deprecated.
Use getPositionType()
|
int |
hashCode() |
java.lang.String |
toString() |
getIntegerProperty, getIntegerProperty, getProperties, getStringProperty, getStringProperty@Deprecated public CuePoint(CuePoint.PositionType positionType, @NonNull java.lang.String type, java.util.Map<java.lang.String,java.lang.Object> properties)
positionType - Either PositionType.Before (pre-roll) or PositionType.After (post-roll).type - The type of the cue point. Valid values are: "AD" or "CODE".properties - The properties describing this cue point.public CuePoint(@NonNull
CuePoint.PositionType positionType,
@NonNull
CuePoint.CuePointType type,
java.util.Map<java.lang.String,java.lang.Object> properties)
positionType - Either CuePoint.PositionType.BEFORE (pre-roll) or CuePoint.PositionType.AFTER (post-roll).type - Either CuePoint.CuePointType.AD or CuePoint.CuePointType.CODEproperties - The properties describing this cue point.@Deprecated
public CuePoint(int position,
@NonNull
java.lang.String type,
java.util.Map<java.lang.String,java.lang.Object> properties)
position - The offset from the beginning of the video, in milliseconds.type - The type of the cue point. Valid values are "AD" or "CODE".properties - The properties describing this cue point.public CuePoint(int position,
@NonNull
CuePoint.CuePointType type,
java.util.Map<java.lang.String,java.lang.Object> properties)
position - The offset from the beginning of the video, in milliseconds.type - Either CuePointType.AD or CuePointType.CODEproperties - The properties describing this cue point.public CuePoint.PositionType getPositionType()
public int getPosition()
Note that this is only valid for PositionType.POINT_IN_TIME cue points.
java.lang.IllegalStateException - if you call this method on any CuePoint instance whose
position type is not PositionType.POINT_IN_TIME.@Deprecated public java.lang.String getType()
public CuePoint.CuePointType getCuePointType()
public int compareTo(CuePoint cuePoint)
For all CuePoints:
CuePoint.PositionType.BEFORE < CuePoint.PositionType.POINT_IN_TIME < CuePoint.PositionType.AFTER
When both cue points being compared are PositionType.POINT_IN_TIME, then this < cuePoint if this.position < cuePoint.position.
compareTo in interface java.lang.Comparable<CuePoint>cuePoint - The CuePoint to compare to this CuePoint.public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class MetadataObject