Change logic for original option on livestream

This commit is contained in:
Rafael 2022-04-25 19:04:35 -03:00 committed by Thomas Zarebczan
parent daaa787f97
commit 8b443d343c

View file

@ -186,7 +186,11 @@ class HlsQualitySelectorPlugin {
selected: defaultQuality ? currentHeight === defaultQuality : undefined, selected: defaultQuality ? currentHeight === defaultQuality : undefined,
}); });
if (defaultQuality && !nextLowestQualityItem && currentHeight <= defaultQuality) { const isLiveOriginal = defaultQuality && defaultQuality === QUALITY_OPTIONS.ORIGINAL && player.isLivestream;
const shouldCheckHeight =
defaultQuality && !nextLowestQualityItem && (currentHeight <= defaultQuality || isLiveOriginal);
if (shouldCheckHeight) {
nextLowestQualityItem = levelItem; nextLowestQualityItem = levelItem;
nextLowestQualityItemObj = { nextLowestQualityItemObj = {
label: heightStr, label: heightStr,