activeTrackVariant

Obtain the Active Track variant option for the passed TrackVariantInfo.Type, if available.

Return

returns the active TrackVariantInfo for the given TrackVariantInfo.Type, or TrackVariantInfo.UNKNOWN if active variant is not known.

Note: This API returns correct TrackVariantInfo value only after Player.Listener.onActiveTrackVariantChanged has been triggered after either stream format change or by calling setPreferredTrackVariant.

Parameters

type

the TrackVariantInfo.Type of elementary Track for which we need active variant