Amazon Vinyl
    Preparing search index...

    Class TrackControllerImpl<TrackLoadOptionsType>

    Responsible for queuing track load configurations. This is the authority for which is the current track.

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index
    logPrefix: string = ...

    A string prefix for all log statements made by this target.

    • get preloadCapacity(): number

      Returns the current preload capacity. This automatically increases when preload is called with more tracks than the current capacity.

      Returns number

    • Clears all fetched fragments and source buffers. Playback will be interrupted, and streaming will resume again when data has been fetched and buffered. This should be called if a change has been made where the user would expect an immediate change, for example, changing streaming quality from SD to HD.

      Does not unload manifests.

      Returns void

    • Sets the current queue to the provided track list. When the track ends, the next will be played.

      load does not begin playback. Call play() after a load to start playback. Browser autoplay policies may require the first call to play() to be in response to a user interaction such as a click, touch, keypress, or voice event.

      Note that if the current track is the first track provided in the list, that track will be restarted. To set the queue without unloading the current track, use clearQueue followed by enqueue.

      Parameters

      • ...loadOptionsList: readonly TrackLoadOptionsType[]

        A list of load configuration objects to set as a playback queue.

      Returns void

    • Preloads the given list of tracks. The tracks provided will not be enqueued. The track controller's cache size will automatically increase to accommodate the request.

      Prefetch priority note: Tracks have a prefetch priority, later calls to preload will have a higher precedence than previous calls. Previous tracks given to preload will drop off when they are evicted from the cache. This is dependent on cache size.

      Parameters

      Returns void