Interface TextTrackStyle

  • All Implemented Interfaces:

    
    public interface TextTrackStyle
    
                        

    The text track style API.

    • Constructor Detail

    • Method Detail

      • setFontColor

         abstract void setFontColor(@ColorInt() int color)

        Sets the text font color.

        Parameters:
        color - - font color
      • getFontColor

        @ColorInt() abstract int getFontColor()

        Returns the current text font color.

        Returns:

        font color

      • setBackgroundColor

         abstract void setBackgroundColor(@ColorInt() int color)

        Sets the background color.

        Parameters:
        color - - background color
      • getBackgroundColor

        @ColorInt() abstract int getBackgroundColor()

        Returns the current background color.

        Returns:

        background color

      • setWindowColor

         abstract void setWindowColor(@ColorInt() int color)

        Sets the window color.

        Parameters:
        color - - window color
      • getWindowColor

        @ColorInt() abstract int getWindowColor()

        Returns the current window color.

        Returns:

        window color

      • setEdgeColor

         abstract void setEdgeColor(@ColorInt() int color)

        Sets the edge color.

        Parameters:
        color - - edge color
      • getEdgeColor

        @ColorInt() abstract int getEdgeColor()

        Returns the current edge color.

        Returns:

        edge color

      • getFontFile

        @Nullable() abstract String getFontFile()

        Returns the file name of the current font.

        Returns:

        file name of font

      • setFontSize

         abstract void setFontSize(@IntRange(from = 50, to = 300) int fontSize)

        Sets the font size, as a percentage of the default font size.

        Parameters:
        fontSize - - font size, as a percentage between 50% - 300% of the default font size
      • getFontSize

         abstract int getFontSize()

        Returns the current font size, as a percentage of the default font size.

        Returns:

        font size

      • setMarginLeft

         abstract void setMarginLeft(@IntRange(from = 0, to = 100) int marginLeft)

        Sets the left margin of the subtitle drawing box, as a percentage of the player's width.

        Parameters:
        marginLeft - - left margin, as a percentage between 0% - 100% of the player's width
      • setMarginRight

         abstract void setMarginRight(@IntRange(from = 0, to = 100) int marginRight)

        Sets the right margin of the subtitle drawing box, as a percentage of the player's width.

        Parameters:
        marginRight - - right margin, as a percentage between 0% - 100% of the player's width
      • setMarginTop

         abstract void setMarginTop(@IntRange(from = 0, to = 100) int marginTop)

        Sets the top margin of the subtitle drawing box, as a percentage of the player's height.

        Parameters:
        marginTop - - top margin, as a percentage between 0% - 100% of the player's height
      • setMarginBottom

         abstract void setMarginBottom(@IntRange(from = 0, to = 100) int marginBottom)

        Sets the bottom margin of the subtitle drawing box, as a percentage of the player's height.

        Parameters:
        marginBottom - - bottom margin, as a percentage between 0% - 100% of the player's height
      • getMarginLeft

        @IntRange(from = 0, to = 100) abstract int getMarginLeft()

        Returns the left margin of the subtitle drawing box, as a percentage of the player's width.

        Returns:

        left margin

      • getMarginRight

        @IntRange(from = 0, to = 100) abstract int getMarginRight()

        Returns the right margin of the subtitle drawing box, as a percentage of the player's width.

        Returns:

        right margin

      • getMarginTop

        @IntRange(from = 0, to = 100) abstract int getMarginTop()

        Returns the top margin of the subtitle drawing box, as a percentage of the player's height.

        Returns:

        top margin

      • getMarginBottom

        @IntRange(from = 0, to = 100) abstract int getMarginBottom()

        Returns the bottom margin of the subtitle drawing box, as a percentage of the player's height.

        Returns:

        bottom margin

      • reset

         abstract void reset()

        Resets all properties to their default values.