Phone PWA: no backdrop blurs over video, cap auto quality at 480p on touch phones
This commit is contained in:
@@ -3032,9 +3032,13 @@ function chooseQuality() {
|
||||
const match = qs.find((q) => q.label === pref);
|
||||
if (match) return match;
|
||||
}
|
||||
// auto: best quality at or below 720p, else the lowest available.
|
||||
// auto: best quality at or below 720p (480p on touch phones, where a lossy
|
||||
// link rebuffers the picture while the separate audio keeps playing),
|
||||
// else the lowest available.
|
||||
let cap = 720;
|
||||
try { if (matchMedia('(pointer: coarse)').matches && Math.min(screen.width, screen.height) < 600) cap = 480; } catch {}
|
||||
const sorted = [...qs].sort((a, b) => b.height - a.height);
|
||||
return sorted.find((q) => q.height <= 720) || sorted[sorted.length - 1];
|
||||
return sorted.find((q) => q.height <= cap) || sorted[sorted.length - 1];
|
||||
}
|
||||
|
||||
function buildQualityMenu() {
|
||||
|
||||
Reference in New Issue
Block a user