toMediaTrack

abstract fun toMediaTrack(trackType: @C.TrackType Int, trackId: Long, format: Format): MediaTrack

Convert a Format to a MediaTrack respecting the following specifications https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages.Track#roles.