Vinyl
    Preparing search index...

    Interface QualitySelector

    interface QualitySelector {
        selectQuality(
            qualities: readonly MediaQualityMetadata[],
            prefetchState: PrefetchState,
        ): number;
    }

    Implemented by

    Index

    Methods

    • Returns the quality that should currently be streamed.

      Parameters

      • qualities: readonly MediaQualityMetadata[]

        A sorted list of qualities for the currently streaming media. All qualities are expected to be playable.

        Higher bandwidth values are expected to also mean higher quality. That is, if there are multiple playable qualities where one has a higher quality ranking and lower bandwidth, the less efficient representation should be filtered out before the request.

      • prefetchState: PrefetchState

        The current prefetch state.

      Returns number

      Returns the index of the quality to stream.