From 1781ae75d7919ccf94a81bd3397f2f191e8d96cc Mon Sep 17 00:00:00 2001 From: Rob Walch Date: Mon, 29 Jan 2024 13:34:06 -0800 Subject: [PATCH] Fix regression in hls.light.js selection (#6155) Fixes #6151 --- src/controller/abr-controller.ts | 3 ++- tests/functional/auto/setup.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/controller/abr-controller.ts b/src/controller/abr-controller.ts index 3792904c6e5..224eb4f092f 100644 --- a/src/controller/abr-controller.ts +++ b/src/controller/abr-controller.ts @@ -772,7 +772,8 @@ class AbrController implements AbrComponentAPI { (!upSwitch && currentFrameRate > 0 && currentFrameRate < levelInfo.frameRate) || - !levelInfo.supportedResult?.decodingInfoResults?.[0].smooth + (levelInfo.supportedResult && + !levelInfo.supportedResult.decodingInfoResults?.[0].smooth) ) { levelsSkipped.push(i); continue; diff --git a/tests/functional/auto/setup.js b/tests/functional/auto/setup.js index 8c7d26b67be..44b76df8f36 100644 --- a/tests/functional/auto/setup.js +++ b/tests/functional/auto/setup.js @@ -649,7 +649,7 @@ describe(`testing hls.js playback in the browser on "${browserDescription}"`, fu ); } - if (stream.abr && !HlsjsLightBuild) { + if (stream.abr) { it( `should "smooth switch" to highest level and still play after 2s for ${stream.description}`, testSmoothSwitch.bind(null, url, config)