find Best Stream
fun findBestStream(preferredtype: ArcXPVideoConfig.PreferredStreamType, preferredbitrate: Int): Stream?
Content copied to clipboard
This algorithm iterates through the streams looking for one that is of the preferred type and comes closest to matching the max bitrate. If a match is not found it uses recursion to call the algorithm again with the next preferred stream type (the order is HLS, TS, MP4, GIF, GIF-MP4) until we get a match or we have exhausted our preferred types.
Return
ArcVideoStream object
Parameters
preferredtype
Stream type to try to use
preferredbitrate
Bit rate to try to use