Roku translates the info provided in subtitleTracks into availableSubtitleTracks
Including ignoring tracks, if they are not understood, thus making indexing unpredictable.
This function translates between our internel selected subtitle index
and the corresponding index in availableSubtitleTracks.
Identify the default subtitle track
if "requires_text" is true, only return a track if it is textual
This allows forcing text subs, since roku requires transcoding of non-text subs
returns the server-side track index for the appriate subtitle
Given a set of subtitles, and a subtitle index (the index on the server, not in the list provided)
this will set all relevant settings for roku (mainly closed captions) and return the index of the
subtitle track specified, but indexed based on the provided list of subtitles