Cue

Cue

class Cue(val start: Double, val end: Double, val text: String?, val styledText: CharSequence?, val html: String?, val image: Bitmap?, val textAlignment: Layout.Alignment?, val line: Float, val lineType: Cue.LineType, val lineAnchor: Cue.AnchorType, val fractionalPosition: Float, val positionAnchor: Cue.AnchorType, val size: Float, val bitmapHeight: Float, val isWindowColorSet: Boolean, val windowColor: Int, val verticalType: Cue.VerticalType)

Represents a cue of a subtitle track.

See also

Constructors

Cueconstructor(start: Double, end: Double, text: String?, styledText: CharSequence?, html: String?, image: Bitmap?, textAlignment: Layout.Alignment?, line: Float, lineType: Cue.LineType, lineAnchor: Cue.AnchorType, fractionalPosition: Float, positionAnchor: Cue.AnchorType, size: Float, bitmapHeight: Float, isWindowColorSet: Boolean, windowColor: Int, verticalType: Cue.VerticalType)constructor(start: Double, end: Double, text: String?, html: String?)constructor(start: Double, end: Double, styledText: CharSequence?, html: String?)constructor(start: Double, end: Double, image: Bitmap?)

Types

NameSummary
AnchorTypeenum AnchorType : Enum<Cue.AnchorType>
Represents the available anchor types for the cue.
Companionobject Companion
LineTypeenum LineType : Enum<Cue.LineType>
Represents the available line types for the cue.
VerticalTypeenum VerticalType : Enum<Cue.VerticalType>
Represents the vertical formatting for the cue.

Properties

NameSummary
bitmapHeightval bitmapHeight: Float
The bitmap height as a fraction of the of the viewport size, or DIMEN_UNSET if the bitmap should be displayed at its natural height given the bitmap dimensions and the specified size.
endval end: Double
The end time of the Cue in seconds.
fractionalPositionval fractionalPosition: Float
The fractional position of the positionAnchor of the cue within the viewport in the orthogonal direction to line, or DIMEN_UNSET.
htmlval html: String?
The cue text as HTML.
imageval image: Bitmap?
The cue image.
isWindowColorSetval isWindowColorSet: Boolean
True iff the windowColor property is set.
lineval line: Float
The position of the line anchor of the cue box within the viewport in orthogonal direction to the writing direction, or DIMEN_UNSET. Interpretation depends on the value of lineType.
lineAnchorval lineAnchor: Cue.AnchorType
The cues anchor positioned by line. One of AnchorType.AnchorTypeStart, AnchorType.AnchorTypeMiddle, AnchorType.AnchorTypeEnd and AnchorType.TypeUnset.
lineTypeval lineType: Cue.LineType
The type of the value from line.
positionAnchorval positionAnchor: Cue.AnchorType
The cue anchor positioned by fractionalPosition. One of AnchorType.AnchorTypeStart, AnchorType.AnchorTypeMiddle, AnchorType.AnchorTypeEnd and AnchorType.TypeUnset.
sizeval size: Float
The size of the cue in the writing direction specified as a fraction of the viewport size in that direction, or DIMEN_UNSET.
startval start: Double
The start time of the Cue in seconds.
styledText@Transient
val styledText: CharSequence?
The cue text.
textval text: String?
The cue text.
textAlignmentval textAlignment: Layout.Alignment?
The alignment of the cue text.
verticalTypeval verticalType: Cue.VerticalType
The cue vertical type. One of VerticalType.VerticalTypeLeftToRight, VerticalType.VerticalTypeRightToLeft and VerticalType.TypeUnset.
windowColorval windowColor: Int
The fill color of the window.