Enforce a limit on the number of WebMediaPlayers per frame. [chromium/src : main]

1,260 views
Skip to first unread message

Chris Hamilton (Gerrit)

unread,
Apr 8, 2021, 4:40:06 PM4/8/21
to Dale Curtis, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org

Attention is currently required from: Dale Curtis.

Chris Hamilton would like Dale Curtis to review this change.

View Change

Enforce a limit on the number of WebMediaPlayers per frame.

These objects are extremely heavy and a common cause of long-tail memory
usage in both browser and renderer processes.

This intervention blocks creation of further WebMediaPlayers once there
are already 75 (desktop) or 40 (mobile) players created in a frame.
These values were chosen as the 99.9th %ile values from instrumentation
counting the number of players. A failed creation will result in a
"Player load failure: error creating media player" message being
presented to the site, and a console warning.

BUG=1144736

Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
---
M third_party/blink/public/platform/web_media_player.h
M third_party/blink/renderer/modules/modules_initializer.cc
2 files changed, 103 insertions(+), 2 deletions(-)


To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 1
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-MessageType: newchange

Chris Hamilton (Gerrit)

unread,
Apr 8, 2021, 4:40:15 PM4/8/21
to blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Dale Curtis.

View Change

1 comment:

  • Patchset:

    • Patch Set #1:

      Dale, can you sanity check this approach before I bother to write tests? I tried to keep the logic as close as possible to the creation point in the renderer (so as not to incur useless IPCs), and to make it easier to integrate with the console for intervention logging. I'm also not sure the LifetimeObserver for WebMediaPlayer is the best approach, but it's certainly the easiest.

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 1
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Comment-Date: Thu, 08 Apr 2021 20:40:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Dale Curtis (Gerrit)

unread,
Apr 8, 2021, 5:05:11 PM4/8/21
to Chris Hamilton, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Chris Hamilton.

View Change

1 comment:

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 1
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
Gerrit-Comment-Date: Thu, 08 Apr 2021 21:05:03 +0000

Chris Hamilton (Gerrit)

unread,
Apr 8, 2021, 8:26:52 PM4/8/21
to blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Dale Curtis.

View Change

1 comment:

  • Patchset:

    • Patch Set #1:

      Did my suggestion here https://bugs.chromium. […]

      /facepalm

      For whatever reason, I read that code as occurring on the *browser* side of the connection, and thought that it would be better to move it closer to to the call site in the renderer. Clearly I am an idiot, as I now realize that code is very much running in the renderer. I'll scrap this and do that (next week, I'm on vacation tomorrow)...

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 1
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Comment-Date: Fri, 09 Apr 2021 00:26:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Dale Curtis <dalec...@chromium.org>
Gerrit-MessageType: comment

Chris Hamilton (Gerrit)

unread,
Apr 12, 2021, 11:00:08 AM4/12/21
to blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

View Change

1 comment:

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 3
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Comment-Date: Mon, 12 Apr 2021 14:59:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Dale Curtis (Gerrit)

unread,
Apr 12, 2021, 12:48:19 PM4/12/21
to Chris Hamilton, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Chris Hamilton.

Patch set 3:Code-Review +1

View Change

2 comments:

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 3
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
Gerrit-Comment-Date: Mon, 12 Apr 2021 16:48:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Chris Hamilton (Gerrit)

unread,
Apr 12, 2021, 3:10:48 PM4/12/21
to Kentaro Hara, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Dale Curtis

Attention is currently required from: Kentaro Hara.

Chris Hamilton would like Kentaro Hara to review this change.

View Change

Enforce a limit on the number of WebMediaPlayers per frame.

These objects are extremely heavy and a common cause of long-tail memory
usage in both browser and renderer processes.

This intervention blocks creation of further WebMediaPlayers once there
are already 75 (desktop) or 40 (mobile) players created in a frame.
These values were chosen as the 99.9th %ile values from instrumentation
counting the number of players. A failed creation will result in a
"Player load failure: error creating media player" message being
presented to the site, and a console warning.

BUG=1144736

Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
---
M content/renderer/media/media_factory.cc
M content/renderer/media/media_factory.h
M content/renderer/media/renderer_webmediaplayer_delegate.h
A content/renderer/media/too_many_web_media_players_intervention_browsertest.cc
M content/test/BUILD.gn
A content/test/data/media/too_many_web_media_players_intervention_test.html
M third_party/blink/public/web/web_local_frame.h
M third_party/blink/renderer/core/frame/web_local_frame_impl.cc
M third_party/blink/renderer/core/frame/web_local_frame_impl.h
9 files changed, 155 insertions(+), 2 deletions(-)


To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 5
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-MessageType: newchange

Chris Hamilton (Gerrit)

unread,
Apr 12, 2021, 3:11:02 PM4/12/21
to blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Kentaro Hara.

View Change

2 comments:

  • Patchset:

    • Patch Set #5:

      Dale: Added a browser test. Another look?

      +haraken for blink

  • File content/renderer/media/renderer_webmediaplayer_delegate.h:

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 5
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Comment-Date: Mon, 12 Apr 2021 19:10:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Dale Curtis (Gerrit)

unread,
Apr 12, 2021, 3:47:09 PM4/12/21
to Chris Hamilton, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Chris Hamilton, Kentaro Hara.

Patch set 5:Code-Review +1

View Change

3 comments:

  • Patchset:

    • Patch Set #5:

      That test is likely to end up flaky on the bots, they don't do well with this many videos generally.

  • File content/test/data/media/too_many_web_media_players_intervention_test.html:

    • Patch Set #5, Line 19: await v.play();

      I wouldn't play them since that'll eat a lot of resource unnecessarily.

    • Patch Set #5, Line 26: <video width="320" height="240" controls>

      You may want to use a small data:// or blob:// URL instead of URL based loading for all tags since that can be resource heavy. fetch() => blob would also work.

      Since we don't care if these actually play or not, just that the tags are loaded, you can provide a poster image and set preload=metadata to ensure we only do the minimal possible loading for each video.

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 5
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Comment-Date: Mon, 12 Apr 2021 19:46:59 +0000

Chris Hamilton (Gerrit)

unread,
Apr 12, 2021, 5:40:42 PM4/12/21
to blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Dale Curtis, Kentaro Hara.

View Change

3 comments:

  • Patchset:

    • Patch Set #5:

      That test is likely to end up flaky on the bots, they don't do well with this many videos generally.

    • Ack. Some tests are failing because of "excessive output". I'll inject a testing seam that lets me set the cap much lower.

      I've done this via a command-line flag, but it feels dirty. Any idea what is the best practice for configuring a renderer for test-only behavior from a browser process?

  • File content/test/data/media/too_many_web_media_players_intervention_test.html:

    • Done

    • You may want to use a small data:// or blob:// URL instead of URL based loading for all tags since t […]

      Thanks for the pointers, I know basically nothing of these APIs :)

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 6
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Comment-Date: Mon, 12 Apr 2021 21:40:27 +0000

Dale Curtis (Gerrit)

unread,
Apr 12, 2021, 5:48:01 PM4/12/21
to Chris Hamilton, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Tricium, Kentaro Hara, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Chris Hamilton, Kentaro Hara.

Patch set 6:Code-Review +1

View Change

1 comment:

  • File content/public/common/content_switches.cc:

    • Patch Set #6, Line 542: "limit-web-media-players-for-testing";

      I think I'd just call this --web-media-player-limit <###> so if we run into issues we can have folks debug by setting the limit higher.

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 6
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Comment-Date: Mon, 12 Apr 2021 21:47:50 +0000

Dale Curtis (Gerrit)

unread,
Apr 12, 2021, 5:48:46 PM4/12/21
to Chris Hamilton, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Tricium, Kentaro Hara, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Chris Hamilton, Kentaro Hara.

View Change

1 comment:

  • File content/test/data/media/too_many_web_media_players_intervention_test.html:

    • Patch Set #6, Line 24: poster="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">

      Oh for poster you can just use an image file. I meant for the video src you should use a blob or data url.

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 6
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Comment-Date: Mon, 12 Apr 2021 21:48:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Dale Curtis (Gerrit)

unread,
Apr 12, 2021, 5:49:05 PM4/12/21
to Chris Hamilton, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Tricium, Kentaro Hara, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Chris Hamilton, Kentaro Hara.

View Change

1 comment:

  • File content/test/data/media/too_many_web_media_players_intervention_test.html:

    • Patch Set #6, Line 24: poster="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">

    • Oh for poster you can just use an image file. […]

      (Though it may not matter with a much lower limit)

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 6
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Comment-Date: Mon, 12 Apr 2021 21:48:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Kentaro Hara (Gerrit)

unread,
Apr 12, 2021, 8:44:37 PM4/12/21
to Chris Hamilton, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Tricium, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Chris Hamilton.

Patch set 6:Code-Review +1

View Change

1 comment:

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 6
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
Gerrit-Comment-Date: Tue, 13 Apr 2021 00:44:27 +0000

Chris Hamilton (Gerrit)

unread,
Apr 13, 2021, 10:57:16 AM4/13/21
to blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Dale Curtis

Attention is currently required from: Nasko Oskov.

Chris Hamilton would like Nasko Oskov to review this change.

View Change

Enforce a limit on the number of WebMediaPlayers per frame.

These objects are extremely heavy and a common cause of long-tail memory
usage in both browser and renderer processes.

This intervention blocks creation of further WebMediaPlayers once there
are already 75 (desktop) or 40 (mobile) players created in a frame.
These values were chosen as the 99.9th %ile values from instrumentation
counting the number of players. A failed creation will result in a
"Player load failure: error creating media player" message being
presented to the site, and a console warning.

BUG=1144736

Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
---
M content/browser/renderer_host/render_process_host_impl.cc
M content/public/common/content_switches.cc
M content/public/common/content_switches.h
M content/renderer/media/media_factory.cc

M content/renderer/media/renderer_webmediaplayer_delegate.h
A content/renderer/media/too_many_web_media_players_intervention_browsertest.cc
M content/test/BUILD.gn
A content/test/data/media/too_many_web_media_players_intervention_test.html
M third_party/blink/public/web/web_local_frame.h
M third_party/blink/renderer/core/frame/web_local_frame_impl.cc
M third_party/blink/renderer/core/frame/web_local_frame_impl.h
11 files changed, 171 insertions(+), 2 deletions(-)


To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 7
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Nasko Oskov <na...@chromium.org>
Gerrit-MessageType: newchange

Chris Hamilton (Gerrit)

unread,
Apr 13, 2021, 10:57:31 AM4/13/21
to blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Nasko Oskov.

View Change

3 comments:

  • Patchset:

    • Patch Set #7:

      Thanks! Refactored the flag to make it non-test-only.

      +nasko@ for content/ changes.

  • File content/public/common/content_switches.cc:

    • I think I'd just call this --web-media-player-limit <###> so if we run into issues we can have folks […]

      Done.

  • File content/test/data/media/too_many_web_media_players_intervention_test.html:

    • Patch Set #6, Line 24: poster="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">

    • (Though it may not matter with a much lower limit)

      Ack

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 7
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Nasko Oskov <na...@chromium.org>
Gerrit-Comment-Date: Tue, 13 Apr 2021 14:57:10 +0000

Dale Curtis (Gerrit)

unread,
Apr 13, 2021, 2:11:08 PM4/13/21
to Chris Hamilton, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Chris Hamilton, Nasko Oskov.

Patch set 7:Code-Review +1

View Change

2 comments:

  • File content/renderer/media/media_factory.cc:

    • Patch Set #7, Line 120: static constexpr size_t kDefaultMaxWebMediaPlayers =

      Drop static here and below. Not needed in anonymous namespace.

    • Patch Set #7, Line 129: static size_t max_web_media_players = 0;

      Since this is on the render thread it's probably fine, but generally prefer:

        static const size_t kMaxWebMediaPlayers = []() {
      ...
      return limit;
      };
      return kMaxWebMediaPlayers;

      to ensure thread safe static initialization I think.

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 7
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
Gerrit-Attention: Nasko Oskov <na...@chromium.org>
Gerrit-Comment-Date: Tue, 13 Apr 2021 18:10:56 +0000

Chris Hamilton (Gerrit)

unread,
Apr 13, 2021, 2:44:48 PM4/13/21
to blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Nasko Oskov.

View Change

2 comments:

  • File content/renderer/media/media_factory.cc:

    • Patch Set #7, Line 120: static constexpr size_t kDefaultMaxWebMediaPlayers =

      Drop static here and below. Not needed in anonymous namespace.

    • Oops, cut and paste error when moving this from the public header.

    • Since this is on the render thread it's probably fine, but generally prefer: […]

      Good point... I was assuming this would only run on the main thread, but if Blink ever becomes multi-threaded (long term place) it indeed does need to be thread safe.

      Done.

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 8
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Nasko Oskov <na...@chromium.org>
Gerrit-Comment-Date: Tue, 13 Apr 2021 18:44:27 +0000

Dale Curtis (Gerrit)

unread,
Apr 13, 2021, 3:20:44 PM4/13/21
to Chris Hamilton, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Chris Hamilton, Nasko Oskov.

Patch set 8:Code-Review +1

View Change

1 comment:

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 8
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
Gerrit-Attention: Nasko Oskov <na...@chromium.org>
Gerrit-Comment-Date: Tue, 13 Apr 2021 19:20:30 +0000

Nasko Oskov (Gerrit)

unread,
Apr 13, 2021, 6:14:04 PM4/13/21
to Chris Hamilton, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Attention is currently required from: Chris Hamilton.

Patch set 8:Code-Review +1

View Change

1 comment:

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 8
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
Gerrit-Comment-Date: Tue, 13 Apr 2021 22:13:53 +0000

Chris Hamilton (Gerrit)

unread,
Apr 13, 2021, 9:30:39 PM4/13/21
to blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

View Change

1 comment:

To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
Gerrit-Change-Number: 2816118
Gerrit-PatchSet: 8
Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Comment-Date: Wed, 14 Apr 2021 01:30:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Chris Hamilton (Gerrit)

unread,
Apr 13, 2021, 9:30:52 PM4/13/21
to blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Dale Curtis, Chromium LUCI CQ, chromium...@chromium.org, srirama chandra sekhar

Patch set 8:Commit-Queue +2

View Change

    To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
    Gerrit-Change-Number: 2816118
    Gerrit-PatchSet: 8
    Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
    Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
    Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Comment-Date: Wed, 14 Apr 2021 01:30:41 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Chromium LUCI CQ (Gerrit)

    unread,
    Apr 13, 2021, 9:41:08 PM4/13/21
    to Chris Hamilton, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Dale Curtis, chromium...@chromium.org, srirama chandra sekhar

    Chromium LUCI CQ submitted this change.

    View Change

    Approvals: Dale Curtis: Looks good to me Nasko Oskov: Looks good to me Kentaro Hara: Looks good to me Chris Hamilton: Commit
    Enforce a limit on the number of WebMediaPlayers per frame.

    These objects are extremely heavy and a common cause of long-tail memory
    usage in both browser and renderer processes.

    This intervention blocks creation of further WebMediaPlayers once there
    are already 75 (desktop) or 40 (mobile) players created in a frame.
    These values were chosen as the 99.9th %ile values from instrumentation
    counting the number of players. A failed creation will result in a
    "Player load failure: error creating media player" message being
    presented to the site, and a console warning.

    BUG=1144736

    Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2816118
    Reviewed-by: Dale Curtis <dalec...@chromium.org>
    Reviewed-by: Nasko Oskov <na...@chromium.org>
    Reviewed-by: Kentaro Hara <har...@chromium.org>
    Commit-Queue: Chris Hamilton <chr...@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#872232}

    ---
    M content/browser/renderer_host/render_process_host_impl.cc
    M content/public/common/content_switches.cc
    M content/public/common/content_switches.h
    M content/renderer/media/media_factory.cc
    M content/renderer/media/renderer_webmediaplayer_delegate.h
    A content/renderer/media/too_many_web_media_players_intervention_browsertest.cc
    M content/test/BUILD.gn
    A content/test/data/media/too_many_web_media_players_intervention_test.html
    M third_party/blink/public/web/web_local_frame.h
    M third_party/blink/renderer/core/frame/web_local_frame_impl.cc
    M third_party/blink/renderer/core/frame/web_local_frame_impl.h
    11 files changed, 169 insertions(+), 2 deletions(-)


    To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
    Gerrit-Change-Number: 2816118
    Gerrit-PatchSet: 9
    Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
    Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
    Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-MessageType: merged

    Chris Hamilton (Gerrit)

    unread,
    Apr 14, 2021, 9:22:50 AM4/14/21
    to Chromium LUCI CQ, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Dale Curtis, chromium...@chromium.org, srirama chandra sekhar

    View Change

    3 comments:

    To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
    Gerrit-Change-Number: 2816118
    Gerrit-PatchSet: 9
    Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
    Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
    Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Comment-Date: Wed, 14 Apr 2021 13:22:40 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Chris Hamilton <chr...@chromium.org>

    John Warburton (Gerrit)

    unread,
    Jun 9, 2021, 1:32:32 PM6/9/21
    to Chris Hamilton, Chromium LUCI CQ, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Dale Curtis, chromium...@chromium.org, srirama chandra sekhar

    View Change

    1 comment:

    • Patchset:

      • Patch Set #9:

        Hello, I'm just a user and web programmer, but is there a way of disabling this limit? It's broken a small app used here for helping to de-duplicate tracks in a music database. About 230 players are loaded up in a simple table, each linked to an MP3 file, so possible duplicate pieces of music can be auditioned.

        Thank you for looking at this.
        jo...@johnwarburton.net

    To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
    Gerrit-Change-Number: 2816118
    Gerrit-PatchSet: 9
    Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
    Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
    Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
    Gerrit-CC: John Warburton <jo...@johnwarburton.net>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Comment-Date: Wed, 09 Jun 2021 17:32:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Dale Curtis (Gerrit)

    unread,
    Jun 9, 2021, 3:26:18 PM6/9/21
    to Chris Hamilton, Chromium LUCI CQ, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, John Warburton, Kentaro Hara, Tricium, chromium...@chromium.org, srirama chandra sekhar

    Attention is currently required from: Chris Hamilton.

    View Change

    1 comment:

    • Patchset:

      • Patch Set #9:

        Hello, I'm just a user and web programmer, but is there a way of disabling this limit? It's broken a […]

        You should just need to mark the <audio> tags with preload=none to avoid creating all the WebMediaPlayers before use. With preload=none they'll only be created when played. Unless you expect users to start more than 75 concurrently on desktop or 40+ on Android that should solve your problem.

    To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
    Gerrit-Change-Number: 2816118
    Gerrit-PatchSet: 9
    Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
    Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
    Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
    Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
    Gerrit-CC: John Warburton <jo...@johnwarburton.net>
    Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
    Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
    Gerrit-Comment-Date: Wed, 09 Jun 2021 19:26:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: John Warburton <jo...@johnwarburton.net>
    Gerrit-MessageType: comment

    John Warburton (Gerrit)

    unread,
    Jun 9, 2021, 4:41:36 PM6/9/21
    to Chris Hamilton, Chromium LUCI CQ, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Dale Curtis, chromium...@chromium.org, srirama chandra sekhar

    Attention is currently required from: Chris Hamilton.

    Thank you very much for this suggestion.

    It sounds entirely practical and I'll try it tomorrow.

    With best wishes,

    JW

    View Change

      To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
      Gerrit-Change-Number: 2816118
      Gerrit-PatchSet: 9
      Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
      Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
      Gerrit-CC: John Warburton <jo...@johnwarburton.net>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
      Gerrit-Comment-Date: Wed, 09 Jun 2021 20:41:26 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      Gerrit-MessageType: comment

      Riley Dutton

      unread,
      Jul 21, 2021, 4:07:40 PM7/21/21
      to feature-media-reviews, John Warburton (Gerrit), blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Dale Curtis, chromium...@chromium.org, srirama chandra sekhar, Chris Hamilton, Chromium LUCI CQ, change-...@chromium-review.googlesource.com
      Hey all,

      I'm one of the Developers on Roll20 (https://roll20.net), and online VTT that makes heavy usage of multi-media components. We use WebRTC for audio and video chat, audio tags for our Jukebox system, and video tags for things like animated tokens.

      This update has basically broken our software. Has any consideration been given to presenting this as an option that can be toggled (i.e. once the limit is reached, an alert pops up with a box where you can opt-in to allowing more tags on the page?) I've also seen conversations starting to happen for things like Jitsi Meet where essentially this is now putting a cap on the number of folks that can be in a call. Seems like something that the user should be able to control.

      Best,

      Riley

      Joseph Anderson

      unread,
      Jul 21, 2021, 6:00:29 PM7/21/21
      to feature-media-reviews, Riley Dutton, John Warburton (Gerrit), blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Kentaro Hara, Tricium, Dale Curtis, chromium...@chromium.org, srirama chandra sekhar, Chris Hamilton, Chromium LUCI CQ, change-...@chromium-review.googlesource.com
      I'd like to second Riley's concerns here in that this should be toggle-able / disable-able setting as I also have several applications that create dynamic audio players via the use of "new Audio();" constructor in JavaScript. Some of my users have reported issues using my apps and I have had to instruct them to revert to a previous version of Chrome to overcome this restriction.

      Regards,
      Joseph

      Minh Son TRAN (Gerrit)

      unread,
      Jul 22, 2021, 2:29:19 AM7/22/21
      to Chris Hamilton, Chromium LUCI CQ, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, John Warburton, Kentaro Hara, Tricium, Dale Curtis, chromium...@chromium.org, srirama chandra sekhar

      Attention is currently required from: Chris Hamilton.

      View Change

      2 comments:

      • Patchset:

        • Patch Set #9:

          You should just need to mark the <audio> tags with preload=none to avoid creating all the WebMediaPl […]

          Dear Dale Curtis,
          I have the same problem as John Warburton but with video track. We host up to 35 cameras concurrently in a video conference, and they eat up very quickly the limit 40.
          Everything worked well with the previous Chrome Release. The Version 92 just drops the cameras.Is it possible to increase or disable this feature?
          Many thanks

        • Patch Set #9:

          Dear Dale Curtis,
          I have the same problem as John Warburton but with video track. We host up to 35 cameras concurrently in a video conference, and they eat up very quickly the limit 40.
          Everything worked well with the previous Chrome Release. The Version 92 just drops the cameras.Is it possible to increase or disable this feature?
          Many thanks

      To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
      Gerrit-Change-Number: 2816118
      Gerrit-PatchSet: 9
      Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
      Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
      Gerrit-CC: John Warburton <jo...@johnwarburton.net>
      Gerrit-CC: Minh Son TRAN <son.mi...@gmail.com>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
      Gerrit-Comment-Date: Thu, 22 Jul 2021 06:29:08 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Dale Curtis <dalec...@chromium.org>

      Mattie Ruth Kramer Backman (Gerrit)

      unread,
      Jul 23, 2021, 3:42:37 PM7/23/21
      to Chris Hamilton, Chromium LUCI CQ, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Tom Jenkinson, Minh Son TRAN, John Warburton, Kentaro Hara, Tricium, Dale Curtis, chromium...@chromium.org, srirama chandra sekhar

      Attention is currently required from: Chris Hamilton.

      View Change

      1 comment:

      • Patchset:

        • Patch Set #9:

          Hi!
          I am a developer at Daily (http://daily.co). We provide a WebRTC API and hosting service. This change significantly impacts the capabilities we provide on Chrome. As such, I would like to vote to consider reverting this change. We have customers with a wide variety of use cases that suddenly no longer work. For instance, calls with > 37 simultaneous participants, all sharing audio and video, large gridded views of participants (>75), and clubhouse-like mobile pages with >40 audio-only participants.

          I believe this not only limits several legitimate WebRTC use-cases, but is a regression against the great strides which browsers, especially Chrome, have made over the last few years. It is true that UIs can work around the limitation to some degree with better accounting of elements in use (removing srcObject on muted participants or combining audio tracks into one element, for instance). However, developers are painted into a corner with how they implement their UIs. Also, we have experienced issues with things like combined audio tracks introducing crackle.

          If this limitation is to stay, then I'd like to request three things.
          1. A fix for https://bugs.chromium.org/p/chromium/issues/detail?id=1232455&q=webmediaplayer&can=2 which can easily trip developers up and increase their chance of hitting this limitation despite only having a few media elements on the DOM.
          2. A way to dynamically query the number of WebMediaPlayers so that we can detect when we may hit this limitation prior to doing so and react accordingly.
          3. API to dynamically increase or remove the limitation so that we can chose to push chrome's limits based on use-case. `preload=none` has been mentioned as a work-around but it does not work with `autoplay` and does not actually change the limit.

          Thank you for your consideration!

      To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
      Gerrit-Change-Number: 2816118
      Gerrit-PatchSet: 9
      Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
      Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
      Gerrit-CC: John Warburton <jo...@johnwarburton.net>
      Gerrit-CC: Mattie Ruth Kramer Backman <matti...@gmail.com>
      Gerrit-CC: Minh Son TRAN <son.mi...@gmail.com>
      Gerrit-CC: Tom Jenkinson <thomas_j...@hotmail.co.uk>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
      Gerrit-Comment-Date: Fri, 23 Jul 2021 19:42:24 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Gerrit-MessageType: comment

      Philipp Hancke (Gerrit)

      unread,
      Jul 24, 2021, 8:36:06 AM7/24/21
      to Chris Hamilton, Chromium LUCI CQ, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Mattie Ruth Kramer Backman, Tom Jenkinson, Minh Son TRAN, John Warburton, Kentaro Hara, Tricium, Dale Curtis, chromium...@chromium.org, srirama chandra sekhar

      Attention is currently required from: Chris Hamilton.

      View Change

      1 comment:

      To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
      Gerrit-Change-Number: 2816118
      Gerrit-PatchSet: 9
      Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
      Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
      Gerrit-CC: John Warburton <jo...@johnwarburton.net>
      Gerrit-CC: Mattie Ruth Kramer Backman <matti...@gmail.com>
      Gerrit-CC: Minh Son TRAN <son.mi...@gmail.com>
      Gerrit-CC: Philipp Hancke <philipp...@googlemail.com>
      Gerrit-CC: Tom Jenkinson <thomas_j...@hotmail.co.uk>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      Gerrit-Attention: Chris Hamilton <chr...@chromium.org>
      Gerrit-Comment-Date: Sat, 24 Jul 2021 12:35:51 +0000

      Chris Hamilton (Gerrit)

      unread,
      Jul 27, 2021, 2:29:24 PM7/27/21
      to Chromium LUCI CQ, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Christopher Bowal, Philipp Hancke, Mattie Ruth Kramer Backman, Tom Jenkinson, Minh Son TRAN, John Warburton, Kentaro Hara, Tricium, Dale Curtis, chromium...@chromium.org, srirama chandra sekhar

      View Change

      1 comment:

      To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
      Gerrit-Change-Number: 2816118
      Gerrit-PatchSet: 9
      Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
      Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
      Gerrit-CC: Christopher Bowal <ch...@lumen5.com>
      Gerrit-CC: John Warburton <jo...@johnwarburton.net>
      Gerrit-CC: Mattie Ruth Kramer Backman <matti...@gmail.com>
      Gerrit-CC: Minh Son TRAN <son.mi...@gmail.com>
      Gerrit-CC: Philipp Hancke <philipp...@googlemail.com>
      Gerrit-CC: Tom Jenkinson <thomas_j...@hotmail.co.uk>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      Gerrit-Comment-Date: Tue, 27 Jul 2021 18:29:10 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Dale Curtis <dalec...@chromium.org>
      Comment-In-Reply-To: John Warburton <jo...@johnwarburton.net>
      Comment-In-Reply-To: Minh Son TRAN <son.mi...@gmail.com>
      Gerrit-MessageType: comment

      전상인 (Gerrit)

      unread,
      Apr 4, 2023, 8:09:38 PM4/4/23
      to Chris Hamilton, Chromium LUCI CQ, blink-re...@chromium.org, blink-...@chromium.org, eric.c...@apple.com, feature-me...@chromium.org, Christopher Bowal, Philipp Hancke, Mattie Ruth Kramer Backman, Tom Jenkinson, Minh Son TRAN, John Warburton, Kentaro Hara, Tricium, Dale Curtis, chromium...@chromium.org, srirama chandra sekhar

      View Change

      1 comment:

      • Patchset:

        • Patch Set #9:

          Hello I'm a web developer, struggling with this issue for days.

          In my website, there are pages with multiple <audio> elements (sometimes more than 100, not fixed). All of them are set to 'preload=none'. An end-user plays the audio consecutively, one by one. Sometimes one or two audios might overlap, but definitely not 75 players would be played at the same time. (I'm sure about this because the website is an in-house product)

          The user does this task for hours, navigating from a page to another, which also has multiple <audio> sources. They get the error ([Intervention] Blocked attempt to create a web media player as there are too many webmediaplayers already in existence) once in a while, usually in a 40min ~ 1hour period.

          Can't find a reason.. any help or suggestions are welcomed. Thanks.

      To view, visit change 2816118. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I0cb30c9a9ef95981fb4d3e8563d6f5cbfdb30f42
      Gerrit-Change-Number: 2816118
      Gerrit-PatchSet: 9
      Gerrit-Owner: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chris Hamilton <chr...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
      Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
      Gerrit-Reviewer: Nasko Oskov <na...@chromium.org>
      Gerrit-CC: Christopher Bowal <ch...@lumen5.com>
      Gerrit-CC: John Warburton <jo...@johnwarburton.net>
      Gerrit-CC: Mattie Ruth Kramer Backman <matti...@gmail.com>
      Gerrit-CC: Minh Son TRAN <son.mi...@gmail.com>
      Gerrit-CC: Philipp Hancke <philipp...@googlemail.com>
      Gerrit-CC: Tom Jenkinson <thomas_j...@hotmail.co.uk>
      Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
      Gerrit-CC: 전상인 <sangin...@gmail.com>
      Gerrit-Comment-Date: Wed, 05 Apr 2023 00:09:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Gerrit-MessageType: comment
      Reply all
      Reply to author
      Forward
      0 new messages