JWCaptionStyle

@objcMembers
public class JWCaptionStyle : NSObject

Configuration object used to customize the captions. Styles specified using this structure will only be applied if the user’s accessibility settings allow it, and only for SRT and WebVTT captions. EIA-608 captions always default to the user’s accessibility settings.

  • Overrides the default font color of the captions, including its opacity.

    Note

    Styles specified using this property will only be applied if the user’s accessibility settings allow it, and only for SRT and WebVTT captions. EIA-608 captions always default to the user’s accessibility settings.

    Declaration

    Swift

    public internal(set) var fontColor: UIColor? { get }
  • Changes the background color and the opacity of the overall window the captions reside in.

    Note

    Styles specified using this property will only be applied if the user’s accessibility settings allow it, and only for SRT and WebVTT captions. EIA-608 captions always default to the user’s accessibility settings.

    Declaration

    Swift

    public internal(set) var backgroundColor: UIColor? { get }
  • Changes the highlight color and highlight opacity of the text.

    Note

    Styles specified using this property will only be applied if the user’s accessibility settings allow it, and only for SRT and WebVTT captions. EIA-608 captions always default to the user’s accessibility settings.

    Declaration

    Swift

    public internal(set) var highlightColor: UIColor? { get }
  • Overrides the default font style and font size.

    Note

    Styles specified using this property will only be applied if the user’s accessibility settings allow it, and only for SRT and WebVTT captions. EIA-608 captions always default to the user’s accessibility settings.

    Declaration

    Swift

    public internal(set) var font: UIFont? { get set }
  • The edge style is an option to put emphasis around text. The available options are: none, dropshadow, raised, depressed, and uniform.

    Note

    Styles specified using this property will only be applied if the user’s accessibility settings allow it, and only for SRT and WebVTT captions. EIA-608 captions always default to the user’s accessibility settings.

    Declaration

    Swift

    public internal(set) var edgeStyle: JWCaptionEdgeStyle { get }
  • The default position of captions displayed in the player.

    This position is used if no position is specified by the caption itself, and this is only used with side-loaded captions. Because SRT captions contain no positional data, SRT captions will always be displayed using what is described by this property. For WebVTT captions, if no positional data is specified within the caption, the default position of the caption will be equal to what is described by this property.

    Declaration

    Swift

    public internal(set) var position: JWCaptionPosition? { get }
  • This property controls whether side-loaded captions will be enlarged for larger player sizes.

    If true, the side-loaded captions will be enlarged for large player sizes such as when the player is full screen. If false, the captions will retain their default assigned size, whether that is from the defined style by the developer or from the user’s accessibility settings.

    This property is true by default.

    Declaration

    Swift

    public internal(set) var allowScaling: Bool { get }