Class TextOverlay
- java.lang.Object
-
- com.google.android.exoplayer2.effect.TextureOverlay
-
- com.google.android.exoplayer2.effect.BitmapOverlay
-
- com.google.android.exoplayer2.effect.TextOverlay
-
@Deprecated public abstract class TextOverlay extends BitmapOverlay
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 aTextureOverlay
from text.Uses a
SpannableString
to store the text and support advanced per-character text styling.
-
-
Field Summary
Fields Modifier and Type Field Description static int
TEXT_SIZE_PIXELS
Deprecated.
-
Constructor Summary
Constructors Constructor Description TextOverlay()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TextOverlay
createStaticTextOverlay(SpannableString overlayText)
Deprecated.Creates aTextOverlay
that shows theoverlayText
with the same default settings inOverlaySettings
throughout the whole video.static TextOverlay
createStaticTextOverlay(SpannableString overlayText, OverlaySettings overlaySettings)
Deprecated.Creates aTextOverlay
that shows theoverlayText
with the sameOverlaySettings
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.-
Methods inherited from class com.google.android.exoplayer2.effect.BitmapOverlay
createStaticBitmapOverlay, createStaticBitmapOverlay, createStaticBitmapOverlay, getTextureId, getTextureSize
-
Methods inherited from class com.google.android.exoplayer2.effect.TextureOverlay
configure, getOverlaySettings
-
-
-
-
Field Detail
-
TEXT_SIZE_PIXELS
public static final int TEXT_SIZE_PIXELS
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
createStaticTextOverlay
public static TextOverlay createStaticTextOverlay(SpannableString overlayText)
Deprecated.Creates aTextOverlay
that shows theoverlayText
with the same default settings inOverlaySettings
throughout the whole video.
-
createStaticTextOverlay
public static TextOverlay createStaticTextOverlay(SpannableString overlayText, OverlaySettings overlaySettings)
Deprecated.Creates aTextOverlay
that shows theoverlayText
with the sameOverlaySettings
throughout the whole video.- Parameters:
overlayText
- The text to overlay on the video.overlaySettings
- TheOverlaySettings
configuring how the overlay is displayed on the frames.
-
getText
public abstract SpannableString getText(long presentationTimeUs)
Deprecated.Returns the overlay text displayed at the specified timestamp.- Parameters:
presentationTimeUs
- The presentation timestamp of the current frame, in microseconds.
-
getBitmap
public Bitmap getBitmap(long presentationTimeUs)
Deprecated.Description copied from class:BitmapOverlay
Returns the overlay bitmap displayed at the specified timestamp.- Specified by:
getBitmap
in classBitmapOverlay
- Parameters:
presentationTimeUs
- The presentation timestamp of the current frame, in microseconds.
-
-