Text Track Styling API

  • The TextTrackStyle API can be used to change the style of the renderred TextTracks.

    See more

    Declaration

    Swift

    @objc(THEOTextTrackStyle)
    public protocol TextTrackStyle
  • The common protocol for TextTrackStyleRuleColor, THEOplayerTextTrackStyleRuleString and THEOplayerTextTrackStyleRuleNumber

    Declaration

    Swift

    public protocol TextTrackStyleRule
  • A TextTrackStyleRule that holds a color (UIColor) value.

    Remark

    Eligible identifiers are determined by the media format and its corresponding text content. For example, the string could contain the CSS selectors used by the corresponding text in Web Video Text Tracks (WebVTT) markup. Specify nil if you want the style attributes to apply to all text in the item.

    Declaration

    Swift

    @objc(THEOplayerTextTrackStyleRuleColor)
    public class TextTrackStyleRuleColor : NSObject, TextTrackStyleRule

    Parameters

    color

    UIColor value

    textSelector

    A string that contains an identifier for the ranges of text to which the style attributes should be applied.

  • A TextTrackStyleRule that holds a color (String) value.

    Remark

    Eligible identifiers are determined by the media format and its corresponding text content. For example, the string could contain the CSS selectors used by the corresponding text in Web Video Text Tracks (WebVTT) markup. Specify nil if you want the style attributes to apply to all text in the item.

    Declaration

    Swift

    @objc(THEOplayerTextTrackStyleRuleString)
    public class TextTrackStyleRuleString : NSObject, TextTrackStyleRule

    Parameters

    string

    String value

    textSelector

    A string that contains an identifier for the ranges of text to which the style attributes should be applied.

  • A TextTrackStyleRule that holds a color (Int) value.

    Remark

    Eligible identifiers are determined by the media format and its corresponding text content. For example, the string could contain the CSS selectors used by the corresponding text in Web Video Text Tracks (WebVTT) markup. Specify nil if you want the style attributes to apply to all text in the item.

    Declaration

    Swift

    @objc(THEOplayerTextTrackStyleRuleNumber)
    public class TextTrackStyleRuleNumber : NSObject, TextTrackStyleRule

    Parameters

    string

    Int value

    textSelector

    A string that contains an identifier for the ranges of text to which the style attributes should be applied.

  • The TextTrackStyleEdgeStyle API can be used to change the edge style of the renderred TextTracks.

    See more

    Declaration

    Swift

    @objc(THEOplayerTextTrackStyleEdgeStyle)
    public class TextTrackStyleEdgeStyle : NSObject