Class 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 a TextureOverlay from text.

    Uses a SpannableString to store the text and support advanced per-character text styling.

    • Field Detail

    • Constructor Detail

      • TextOverlay

        public TextOverlay()
        Deprecated.
    • Method Detail

      • createStaticTextOverlay

        public static TextOverlay createStaticTextOverlay​(SpannableString overlayText,
                                                          OverlaySettings 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.
      • 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 class BitmapOverlay
        Parameters:
        presentationTimeUs - The presentation timestamp of the current frame, in microseconds.