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 aTextureOverlayfrom text.Uses a
SpannableStringto store the text and support advanced per-character text styling.
-
-
Field Summary
Fields Modifier and Type Field Description static intTEXT_SIZE_PIXELSDeprecated.
-
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 TextOverlaycreateStaticTextOverlay(SpannableString overlayText)Deprecated.Creates aTextOverlaythat shows theoverlayTextwith the same default settings inOverlaySettingsthroughout the whole video.static TextOverlaycreateStaticTextOverlay(SpannableString overlayText, OverlaySettings overlaySettings)Deprecated.Creates aTextOverlaythat shows theoverlayTextwith the sameOverlaySettingsthroughout the whole video.BitmapgetBitmap(long presentationTimeUs)Deprecated.Returns the overlay bitmap displayed at the specified timestamp.abstract SpannableStringgetText(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 aTextOverlaythat shows theoverlayTextwith the same default settings inOverlaySettingsthroughout the whole video.
-
createStaticTextOverlay
public static TextOverlay createStaticTextOverlay(SpannableString overlayText, OverlaySettings overlaySettings)
Deprecated.Creates aTextOverlaythat shows theoverlayTextwith the sameOverlaySettingsthroughout the whole video.- Parameters:
overlayText- The text to overlay on the video.overlaySettings- TheOverlaySettingsconfiguring 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:BitmapOverlayReturns the overlay bitmap displayed at the specified timestamp.- Specified by:
getBitmapin classBitmapOverlay- Parameters:
presentationTimeUs- The presentation timestamp of the current frame, in microseconds.
-
-