docs/doc/reference/com/google/android/exoplayer2/effect/TextOverlay.html
Package com.google.android.exoplayer2.effect
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public abstract classTextOverlayextends[BitmapOverlay](BitmapOverlay.html "class in com.google.android.exoplayer2.effect")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Creates a TextureOverlay from text.
Uses a SpannableString to store the text and support advanced per-character text styling.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static int | TEXT_SIZE_PIXELS |
Deprecated.
|
Constructors | Constructor | Description |
| --- | --- |
| TextOverlay() |
Deprecated.
|
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static TextOverlay | createStaticTextOverlay(SpannableString overlayText) |
Deprecated.
Creates a TextOverlay that shows the overlayText with the same default settings in OverlaySettings throughout the whole video.
|
| static TextOverlay | createStaticTextOverlay(SpannableString overlayText, OverlaySettings overlaySettings) |
Deprecated.
Creates a TextOverlay that shows the overlayText with the same OverlaySettings throughout the whole video.
|
| Bitmap | getBitmap(long presentationTimeUs) |
Deprecated.
Returns the overlay bitmap displayed at the specified timestamp.
|
| abstract SpannableString | getText(long presentationTimeUs) |
Deprecated.
Returns the overlay text displayed at the specified timestamp. |
-
createStaticBitmapOverlay, createStaticBitmapOverlay, createStaticBitmapOverlay, getTextureId, getTextureSize
-
configure, getOverlaySettings
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final int TEXT_SIZE_PIXELS
Deprecated. See Also:Constant Field Values
-
public TextOverlay()
Deprecated.
-
public static[TextOverlay](TextOverlay.html "class in com.google.android.exoplayer2.effect")createStaticTextOverlay([SpannableString](https://developer.android.com/reference/android/text/SpannableString.html "class or interface in android.text")overlayText)
Deprecated.
Creates a TextOverlay that shows the overlayText with the same default settings in OverlaySettings throughout the whole video.
-
public static[TextOverlay](TextOverlay.html "class in com.google.android.exoplayer2.effect")createStaticTextOverlay([SpannableString](https://developer.android.com/reference/android/text/SpannableString.html "class or interface in android.text")overlayText,[OverlaySettings](OverlaySettings.html "class in com.google.android.exoplayer2.effect")overlaySettings)
Deprecated.
Creates a TextOverlay that shows the overlayText with the same OverlaySettings throughout the whole video.
Parameters:overlayText - The text to overlay on the video.overlaySettings - The OverlaySettings configuring how the overlay is displayed on the frames.
-
public abstract[SpannableString](https://developer.android.com/reference/android/text/SpannableString.html "class or interface in android.text")getText(long presentationTimeUs)
Deprecated.
Returns the overlay text displayed at the specified timestamp.
Parameters:presentationTimeUs - The presentation timestamp of the current frame, in microseconds.
-
public[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")getBitmap(long presentationTimeUs)
Deprecated.
Description copied from class: BitmapOverlay
Returns the overlay bitmap displayed at the specified timestamp.
Specified by:getBitmap in class BitmapOverlayParameters:presentationTimeUs - The presentation timestamp of the current frame, in microseconds.