Open jamiepiccolo opened 1 year ago
VideoQuality.fromLabel would give incorrect qualities in some cases.
An example being the 1440p label where the method would assign VideoQuality.low144 because of a premature match of the string's prefix "144":
if (label.startsWith('144')) { return VideoQuality.low144; } ... if (label.startsWith('1440')) { return VideoQuality.high1440; }
I simply reversed the resolution map and looped over it so that we start matching from the highest resolution first.
VideoQuality.fromLabel would give incorrect qualities in some cases.
An example being the 1440p label where the method would assign VideoQuality.low144 because of a premature match of the string's prefix "144":
I simply reversed the resolution map and looped over it so that we start matching from the highest resolution first.