Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @accurate-player/accurate-player-cutlist

Index

Functions

assignVideo

  • assignVideo(cut: InternalCut, video: HTMLVideoElement, offset?: number): void
  • Assign a video element to a new cut. Will seek to the start of the new clip.

    Parameters

    • cut: InternalCut

      The cut to assign the video.

    • video: HTMLVideoElement

      The video to assign to a cut.

    • offset: number = 0

      (default: 0) start offset in relation to the clips start.

    Returns void

findCutForTime

  • Find a cut that contains the provided time.

    Parameters

    • time: number

      The time to find in a clip.

    • clips: InternalCut[]

      The list of clips to find.

    Returns InternalCut | undefined

findPreferredVideo

  • findPreferredVideo(clip: InternalCut, videos: HTMLVideoElement[], offset?: number): HTMLVideoElement
  • Find a preferred video for a clip. Will first check if video have same source, then check if clip time is buffered.

    Parameters

    • clip: InternalCut

      The clip to find a video-element to.

    • videos: HTMLVideoElement[]

      The list of available video elements.

    • offset: number = 0

      (default: 0) offset from clips start, used when checking if buffered.

    Returns HTMLVideoElement

scheduleBufferQueue

  • Assign video elements to sequential clips from active cut.

    Parameters

    • activeCut: InternalCut

      The currently playing cut.

    • cuts: InternalCut[]

      The list of cuts.

    • videos: HTMLVideoElement[]

      The list of available video elements.

    Returns void

toInternalCut

  • Convert a list of cuts to its internal representation.

    Parameters

    • cuts: Cut[]

      The cuts to convert.

    Returns InternalCut[]