subsrt-ts
    Preparing search index...

    Main subsrt class.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    format: SubsrtFormats = formats

    Methods

    • Builds a subtitle content.

      Parameters

      Returns string

      The built subtitle content

      TypeError If the format cannot be determined

      TypeError If the format is not supported

      TypeError If the handler does not support 'build' op

    • Detects a subtitle format from the content.

      Parameters

      • content: string

        The subtitle content

      Returns string

      The detected format

    • Gets a list of supported subtitle formats.

      Returns string[]

      The list of supported subtitle formats

    • Parses a subtitle content.

      Parameters

      • content: string

        The subtitle content

      • options: ParseOptions = ...

        The parsing options

      Returns Caption[]

      The parsed captions

      TypeError If the format cannot be determined

      TypeError If the format is not supported

      TypeError If the handler does not support 'parse' op