findBestSourceByBitRate

open fun findBestSourceByBitRate(sourceCollection: SourceCollection, bitRate: Integer): Source

Given a SourceCollection, finds the Source with the closest bit rate to the given value.

Return

the Source that most closely matches the given bit rate, or any Source, if no match can be found

Parameters

sourceCollection

the collection of Sources in which the match should be found

bitRate

the target bit rate desired for the chosen Source