public final class TimedText extends Object
To render the timed text, applications need to do the following:
MediaPlayer.OnTimedTextListener
interfaceMediaPlayer.OnTimedTextListener
callback on a MediaPlayer object that is used for playbackgetText()
to get the characters for renderinggetBounds()
to get the text rendering area/regionMediaPlayer
Modifier and Type | Class and Description |
---|---|
static class |
TimedText.CharPos
Helper class to hold the start char offset and end char offset
for Blinking Text or Highlight Text. endChar is the end offset
of the text (startChar + number of characters to be highlighted
or blinked).
|
static class |
TimedText.Font
Helper class to hold the font ID and name.
|
static class |
TimedText.HyperText
Helper class to hold the hyper text information.
|
static class |
TimedText.Justification
Helper class to hold the justification for text display in the text box.
|
static class |
TimedText.Karaoke
Helper class to hold the karaoke information.
|
static class |
TimedText.Style
Helper class to hold the style information to display the text.
|
Modifier and Type | Method and Description |
---|---|
Rect |
getBounds()
Get the rectangle area or region for rendering the timed text as specified
by a Rect object.
|
String |
getText()
Get the characters in the timed text.
|
public TimedText(Parcel parcel)
obj
- the byte array which contains the timed text.IllegalArgumentExcept
- if parseParcel() fails.
public String getText()
public Rect getBounds()