TimeBase class representing the TimeBaseType in VidiCore

For more info, see the Time bases section in VidiCore API Docs

Hierarchy

  • TimeBase

Time

  • Output TimeBase as frame rate (by default max 16 decimal places)

    Remarks

    For options.fixed:

    • true gives two decimal places
    • false gives max amount of decimal places
    • number gives that amount of decimal places

    Default format: rate with two decimals if needed (i.e. decimals are > 0) Option precedence (when all true): constant > rounded > fixed

    Returns

    Rate of the TimeBase

    Parameters

    • Optional options: {
          fixed?: number | boolean;
          rounded?: boolean;
      }

      For how to display it as rate

      • Optional fixed?: number | boolean
      • Optional rounded?: boolean

    Returns number

Types

denominator: number = 1
numerator: number = 1
  • Get TimeBase in a constant representation (e.g. "PAL") if possible, otherwise undefined

    Returns

    Constant representation of the TimeBase

    Returns string

  • Get TimeBase in a object representation

    Returns

    TimeBase as {denominator, numerator} object

    Returns RationalType

  • Get TimeBase as a VidiCore TimeBaseType string

    Remarks

    Default format: denominator(:numerator if > 1) constant has precedence over fraction if both are true (e.g. NTSC > 30000:1001)

    Returns

    Text representation of the TimeBase

    Parameters

    • Optional options: {
          constant?: boolean;
          fraction?: boolean;
      }

      For how to display it as text

      • Optional constant?: boolean
      • Optional fraction?: boolean

    Returns string