Skip to content

eufy-mega / model/capabilities / resolveVideoQualityTier

Function: resolveVideoQualityTier()

ts
function resolveVideoQualityTier(value): number | undefined;

Resolve a setVideoQuality argument — a resolution NAME (VideoQuality) OR a raw tier — to a valid tier value, else undefined. Unlike a bare Number(), this rejects a value that isn't a real tier (0, negative, out of range): the write is fire-and-forget, so an out-of-range quality value would look like it worked while doing nothing. A numeric string ("2") is a raw tier; a non-numeric string is looked up as a resolution name; a boolean is not a tier.

Parameters

value

string | number | boolean

Returns

number | undefined

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations or eufy. "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.