Amazon Vinyl
    Preparing search index...

    Class SourceObjectTrack

    A base class for all tracks.

    Hierarchy (View Summary)

    Index
    _error: Error | null = null

    Sets on handleError, cleared on 'reset'.

    disposer: Disposer = ...
    drmSessionAbort: AbortSlot = ...
    loadOptions: Maybe<SourceTrackConfigOptions> = null

    The current load options, if this is an active track.

    logPrefix: string = ...

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

    src: Promise<MediaStream>
    type: string

    The track type.

    uri: string

    The identifier of this track, used as the key in the track cache.

    • get active(): boolean

      True if the track is the currently playing track.

      Returns boolean

    • get error(): Error | null

      The last error that occurred in this track, or null if no error.

      Returns Error | null

    • get extra(): any

      Returns the extra object from the load configuration's config when this track is active, or null if this track is not active.

      Returns any

    • get seekRange(): SeekRange | null

      The presentation seek range of the media. Most often {start=0, end=duration} but may be different depending on the media timeline.

      Returns SeekRange | null

    • Sets this track as inactive. This should unset sources, and remove any listeners. Tracks do not implement disposable, when they are deactivated they are expected to be free for garbage collection if there are no longer references to the track.

      Returns void

    • Dispatches an event.

      Type Parameters

      • K extends (keyof StreamingEventMap) | "adsChange"

      Parameters

      • type: K

        The key of the event within EventMap

      • event: TrackEventMap[K]

        If the passed event is read-only, then it may be re-used/cached. Otherwise, it should be a new event object every dispatch. If no target property is set on the event, the target will be set to this host.

      Returns void

    • The track has been activated. Operations on shared resources such as the playback controller may only be done while the track is currently active. For example if there is a loading operation before the playback source is set, isActive must be checked before the property is changed.

      Returns void

    • Resets the track to recover from error states. Base implementation does nothing.

      Overrides should dispatch 'reset' after resetting error state.

      Parameters

      • hard: boolean = false

      Returns void