Function resolveProviderChain

  • Resolve a full provider chain from the available providers and preferences.

    This combines deterministic filtering/reordering via resolveProviderOrder with optional weighted primary selection via selectWeightedProvider. When weights are present, a single primary provider is chosen from the ordered list and moved to the front while the remaining providers preserve their relative order as fallbacks.

    Parameters

    • available: string[]

      Provider IDs currently available in the system.

    • Optional preferences: MediaProviderPreference

      Optional preference configuration.

    Returns string[]

    Ordered provider chain with the chosen primary first.