textalive-app-api - v0.5.2
    Preparing search index...

    Class TimedUnitAbstract

    時刻付きオブジェクトの抽象クラス / Abstract implementation of timed object

    この抽象クラスを継承し、 startTime および endTime プロパティを持つクラスを実装することで、時区間駆動APIなどで活用できるようになります。TypeScriptでの簡単な実装例を以下に示します。

    By implementing a class that extends this abstract class and has startTime and endTime properties, it can be utilised by time-range-driven APIs. A simple example implementation in TypeScript is shown below.

     class MyObject extends TimedUnit {
    constructor(public startTime: number, public endTime: number) {
    super();
    }
    }

    Implements

    Index
    endTime: number
    startTime: number
    • get duration(): number

      Returns number

    • Returns whether this time range contains the specified time (start and end inclusive).

      Parameters

      • time: number

        時刻 [ms] / Time [ms]

      Returns boolean

    • Returns whether the specified range overlaps with this time range (start and end inclusive).

      Parameters

      • objOrStartTime: number | TimedObject
      • OptionalendTime: number

      Returns boolean

    • 指定された時刻をこの時刻付きオブジェクト中の位置 [0, 1] にマッピングして返す

      Returns the position in this timed object [0, 1]

      Parameters

      • time: number

        位置 / Position

      Returns number