Amazon Vinyl
    Preparing search index...

    Function getSegmentInsertionIndexAtTime

    • Returns the count of segments whose startTime <= time — i.e. the index at which a segment with that startTime would be inserted to keep the array sorted ascending.

      Parameters

      • time: number

        Lookup time, in seconds.

      • segments: readonly MediaSegmentMetadata[]

        Segments sorted by startTime ascending.

      Returns number