public final class TimedText
extends Object
java.lang.Object | |
↳ | android.media.TimedText |
用于保存定时文本元数据的类,包括:
要呈现定时文本,应用程序需要执行以下操作:
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/region也可以看看:
Public methods |
|
---|---|
Rect |
getBounds() 获取由Rect对象指定的矩形区域或区域以渲染定时文本。 |
String |
getText() 获取定时文本中的字符。 |
Inherited methods |
|
---|---|
From class java.lang.Object
|
Rect getBounds ()
获取由Rect对象指定的矩形区域或区域以渲染定时文本。
Returns | |
---|---|
Rect |
the rectangle region to render the characters in the timed text. If no bounds information is available (a null is returned), render the timed text at the center bottom of the display. |
String getText ()
获取定时文本中的字符。
Returns | |
---|---|
String |
the characters as a String object in the TimedText. Applications should stop rendering previous timed text at the current rendering region if a null is returned, until the next non-null timed text is received. |