-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Comparable
public class CuePoint extends MetadataObject implements Comparable<CuePoint>
Represents the data of a single cue point.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
CuePoint.PositionType
Indicates the position of the cue point in relation to the entire video.
public enum
CuePoint.CuePointType
Specifies the cue point type.
-
Field Summary
Fields Modifier and Type Field Description private final CuePoint.PositionType
positionType
private final int
position
protected long
positionLong
-
Constructor Summary
Constructors Constructor Description CuePoint(CuePoint.PositionType positionType, String type, Map<String, Object> properties)
Used to create a before (pre-roll) or after (post-roll) cue point. CuePoint(CuePoint.PositionType positionType, CuePoint.CuePointType type, Map<String, Object> properties)
Used to create a pre-roll (PositionType.BEFORE) or post-roll (PositionType.AFTER) cue point. CuePoint(int position, String type, Map<String, Object> properties)
Used to create a point in time (mid-roll) cue point at a specific position. CuePoint(int position, CuePoint.CuePointType type, Map<String, Object> properties)
Used to create a mid-roll (PositionType.POINT_IN_TIME) cue point at a specific position. CuePoint(long position, CuePoint.CuePointType type, Map<String, Object> properties)
Used to create a mid-roll (PositionType.POINT_IN_TIME) cue point at a specific position.
-
Method Summary
Modifier and Type Method Description CuePoint.PositionType
getPositionType()
int
getPosition()
Returns the time offset of the cue point from the beginning of the video, in milliseconds. long
getPositionLong()
Returns the time offset of the cue point from the beginning of the video, in milliseconds. CuePoint.CuePointType
getCuePointType()
int
compareTo(CuePoint cuePoint)
Compares this CuePoint object with the specified CuePoint object. boolean
equals(Object object)
int
hashCode()
String
toString()
-
Methods inherited from class com.brightcove.player.model.MetadataObject
getIntegerProperty, getIntegerProperty, getLongProperty, getProperties, getStringProperty, getStringProperty
-
Methods inherited from class java.lang.Comparable
compareTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CuePoint
CuePoint(CuePoint.PositionType positionType, String type, Map<String, Object> properties)
Used to create a before (pre-roll) or after (post-roll) cue point.- Parameters:
positionType
- Either PositionType.Before (pre-roll) or PositionType.After (post-roll).type
- The type of the cue point.properties
- The properties describing this cue point.
-
CuePoint
CuePoint(CuePoint.PositionType positionType, CuePoint.CuePointType type, Map<String, Object> properties)
Used to create a pre-roll (PositionType.BEFORE) or post-roll (PositionType.AFTER) cue point.- Parameters:
positionType
- Either BEFORE (pre-roll) or AFTER (post-roll).type
- Either AD or CODEproperties
- The properties describing this cue point.
-
CuePoint
CuePoint(int position, String type, Map<String, Object> properties)
Used to create a point in time (mid-roll) cue point at a specific position.- Parameters:
position
- The offset from the beginning of the video, in milliseconds.type
- The type of the cue point.properties
- The properties describing this cue point.
-
CuePoint
CuePoint(int position, CuePoint.CuePointType type, Map<String, Object> properties)
Used to create a mid-roll (PositionType.POINT_IN_TIME) cue point at a specific position.- Parameters:
position
- The offset from the beginning of the video, in milliseconds.type
- Either CuePointType.AD or CuePointType.properties
- The properties describing this cue point.
-
CuePoint
CuePoint(long position, CuePoint.CuePointType type, Map<String, Object> properties)
Used to create a mid-roll (PositionType.POINT_IN_TIME) cue point at a specific position.- Parameters:
position
- The offset from the beginning of the video, in milliseconds.type
- Either CuePointType.AD or CuePointType.properties
- The properties describing this cue point.
-
-
Method Detail
-
getPositionType
CuePoint.PositionType getPositionType()
-
getPosition
@Deprecated() int getPosition()
Returns the time offset of the cue point from the beginning of the video, in milliseconds.
Note that this is only valid for PositionType.POINT_IN_TIME cue points.
-
getPositionLong
long getPositionLong()
Returns the time offset of the cue point from the beginning of the video, in milliseconds.
Note that this is only valid for PositionType.POINT_IN_TIME cue points.
-
getCuePointType
CuePoint.CuePointType getCuePointType()
-
compareTo
int compareTo(CuePoint cuePoint)
Compares this CuePoint object with the specified CuePoint object.
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, thenthis < cuePoint if this.position < cuePoint.position.
- Parameters:
cuePoint
- The CuePoint to compare to this CuePoint.
-
hashCode
int hashCode()
-
-
-
-