Skip to content

[Bug]: Video Picture-in-Picture mute button drawn at the top-left corner (its position is compiled out by picture-in-picture.patch) #56006

Description

@Weedzy33repo

Preflight Checklist

Electron Version

45.4.1

What operating system(s) are you using?

Windows

Operating System Version

Windows 11 (10.0.26300)

What arch are you using?

x64

Last Known Working Electron version

N/A (the mute button did not exist in the PiP window of Electron 38.8.6, which still had the old PiP controls)

Does the issue also appear in Chromium / Google Chrome?

No

Expected Behavior

In the video Picture-in-Picture window (HTMLVideoElement.requestPictureInPicture()), the mute/volume button is placed at the bottom-right of the bottom controls, on the same row as the timestamp, like in Chrome 156+.

Actual Behavior

The mute button is drawn at the top-left corner of the PiP window, on top of the favicon and of the source title ("File on your device" for a file:// page).

Cause, as far as I can tell: patches/chromium/picture-in-picture.patch wraps the live status / live caption code of VideoOverlayWindowViews::OnUpdateControlsBounds() in #if 0. Upstream, the toggle_mute_button_->SetPosition(...) call sits inside that same block (it is positioned relative to live_caption_button_bounds), so it is compiled out too. The button is still created, because media::kPictureInPictureMuteControl is enabled by default, and is added to playback_controls_container_view_, but it never gets a position and stays at (0,0).

The same #if 0 block is still present on main.

A possible fix: keep computing the bottom-right rectangle that the live caption button would have used (or position the mute button at the bottom-right directly) outside the #if 0, and call toggle_mute_button_->SetPosition(...) from there.

Testcase Gist URL

No response

Additional Information

Minimal reproduction:

  1. Create a BrowserWindow with default webPreferences.
  2. Load a page with <video src="test.mp4" autoplay muted loop>.
  3. From the main process: win.webContents.executeJavaScript("document.querySelector('video').requestPictureInPicture()", true).
  4. Hover the PiP window: the mute button appears at the top-left corner, over the source title. Play/pause, ±10 s, the progress bar, previous/next track, back-to-tab and close are all at their expected places.

Possible workaround (not tested): --disable-features=PictureInPictureMuteControl should remove the button entirely, which loses the volume control.

Activity

  1. moved this to 👀 Unsorted Items in 45-x-yon Nov 22, 2026
  2. self-assigned this
    on Nov 25, 2026
  3. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 45-x-yon Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

  • Status
    👍 Does Not Block Stable

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions