THEOplayer Web SDK
    Preparing search index...

    Interface TimeRanges

    Represents one or more ranges of time, each specified by a start time and an end time.

    This is equivalent to the TimeRanges interface used by an HTML video element.

    interface TimeRanges {
        length: number;
        end(index: number): number;
        start(index: number): number;
    }
    Index

    Properties

    Methods

    Properties

    length: number

    Returns the number of ranges in the object.

    Methods

    • Returns the time for the end of the range with the given index.

      Parameters

      • index: number

      Returns number

      Throws an Error if the index is out of bounds.

    • Returns the time for the start of the range with the given index.

      Parameters

      • index: number

      Returns number

      Throws an Error if the index is out of bounds.