createMediaConfiguration

@IviExperimental(reasons = [])
fun createMediaConfiguration(sourceToPolicyProviderMap: Map<SourceId, PolicyProvider> = emptyMap(), fallbackPolicyProvider: PolicyProvider = PolicyProvider()): MediaConfiguration

Provides a convenient way to create a customized MediaConfiguration with custom source policies for test purposes.

This is useful for example for tests with a MediaPlaybackViewModel.

Parameters

sourceToPolicyProviderMap

Map between SourceIds and PolicyProviders to alter how the media frontend displays the given sources.

fallbackPolicyProvider

PolicyProvider used by default for all sources not specified in the sourceToPolicyProviderMap.