Skip to content

Commit

Permalink
Merge pull request #25664 from brave/szilard/41118-keep-webcontents-a…
Browse files Browse the repository at this point in the history
…live-only-for-audible-media

Keep `WebContents` alive only for audible media.
  • Loading branch information
szilardszaloki authored Sep 24, 2024
2 parents 39b39a2 + 981a87c commit c21b844
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void PlaylistSidePanelCoordinator::OnViewIsDeleting(views::View* view) {

void PlaylistSidePanelCoordinator::DestroyWebContentsIfNeeded() {
DCHECK(contents_wrapper_);
if (!contents_wrapper_->web_contents()->GetCurrentlyPlayingVideoCount()) {
if (!contents_wrapper_->web_contents()->IsCurrentlyAudible()) {
contents_wrapper_.reset();
}
}
Expand Down

0 comments on commit c21b844

Please sign in to comment.