From 684dd852164ce94bfdf85d0d8ab2cc1390cdbeba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Wed, 29 Sep 2021 00:04:20 +0200 Subject: [PATCH] Fix: Don't destroy ad manager on detach (#3665) --- lib/player.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/player.js b/lib/player.js index 091b833ebe..e103c32cf6 100644 --- a/lib/player.js +++ b/lib/player.js @@ -1321,9 +1321,8 @@ shaka.Player = class extends shaka.util.FakeEventTarget { } if (this.adManager_) { - // The ad manager is specific to the video, so dispose of it. + // The ad manager is specific to the video, so detach it too. this.adManager_.release(); - this.adManager_ = null; } // Clear our cached copy of the media element.