Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Interface ISyncMediaTimelinePosition

    Describes a position within a SyncMediaTimeline instance. A position is defined using a segment index and an offset within that segment in milliseconds.

    interface ISyncMediaTimelinePosition {
        compareTo(otherPosition: ISyncMediaTimelinePosition): number;
        equals(otherPosition: ISyncMediaTimelinePosition): boolean;
        getOffsetWithinSegmentMs(): number;
        getSegment(): ISyncMediaSegment;
        getSegmentIndex(): number;
        getTimeline(): ISyncMediaTimeline;
        isAfter(otherPosition: ISyncMediaTimelinePosition): boolean;
        isBefore(otherPosition: ISyncMediaTimelinePosition): boolean;
        toJSON(): ISyncMediaTimelinePositionData;
    }

    Implemented by

    Methods

    • Compares the given position with this position.

      Parameters

      Returns number

      Negative number if this position is before otherPosition. 0 if positions are equal. Positive number if this position is after otherPosition

    • Get the offset of this position within the segment in milliseconds.

      Returns number

    • Get the index of the segment that this position targets. If the position is at the end of the timeline, the index will equal timeline.getSegments().length.

      Returns number