diff --git a/src/streaming/controllers/GapController.js b/src/streaming/controllers/GapController.js index 5d1af434ee..7ed3d82de3 100644 --- a/src/streaming/controllers/GapController.js +++ b/src/streaming/controllers/GapController.js @@ -195,6 +195,9 @@ function GapController() { * @private */ function _shouldCheckForGaps(checkSeekingState = false) { + if (!streamController.getActiveStream()) { + return false; + } const trackSwitchInProgress = Object.keys(trackSwitchByMediaType).some((key) => { return trackSwitchByMediaType[key]; });