diff --git a/src/player.ts b/src/player.ts index f936860e..ba760c77 100644 --- a/src/player.ts +++ b/src/player.ts @@ -1445,7 +1445,7 @@ export default class Player extends FakeEventTarget { * @private */ private _applyABRRestriction(config: any): void { - if (Utils.Object.hasPropertyPath(config, 'abr.restrictions') && this._engine && this._tracks.length) { + if (Utils.Object.hasPropertyPath(config, 'abr.restrictions') && this._engine && this._tracks?.length) { const { restrictions } = this._config.abr; const videoTracks: VideoTrack[] = this._tracks.filter((track) => track instanceof VideoTrack); const newVideoTracks = filterTracksByRestriction(videoTracks, restrictions);