Creates a filter predicate that keeps the qualities best matching the preferred language(s). The preference is an ordered list (see resolvePreferredLanguages): earlier entries win, and relatedness (exact > parent > sibling > child) breaks ties within a single preference.
The best match is computed per period (per unique array reference), so periods with different available languages are handled independently. When no available language relates to any preference, all are kept (playback is never stranded). Qualities not matching the content type, or without a language tag, are always kept.
BCP 47 tag, ordered list of tags, or null (which
falls back to navigator.languages).
Only filter qualities matching this content type (e.g. 'audio').
Creates a language filter predicate for use with filterTimelineQualities.