Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue that Google Chrome, Edge, Brave and any chromium-based browser stop playing videos when the window is in Shrink/PiP mode (Update: Hack found!) #146

Closed
gileli121 opened this issue Sep 14, 2021 · 9 comments
Labels

Comments

@gileli121
Copy link
Member

gileli121 commented Sep 14, 2021

More users complain about issue #117 with google chrome.
Google has a built-in feature that is designed to disable video rendering when it thinks that it is invisible.
This is in order to save computer hardware resources usage.

As a result, you get this issue when you Shrink window:
image

(Screenshot from #117)

The issue is that chrome thinks by mistake that it is invisible when it is actually not.
In Shrink + Live Preview mode, the real window is indeed invisible.
However, the window is cloned using Windows DWM API to another window owned by WindowTop

In this case, chrome is not invisible. The only invisible thing is the chrome window.
But you still see the window via the Shrink mode (a second window that cloning it).

So what we need to do to handle this issue:

Option 1
Open bug for and report about it so it will be fixed in google chrome browser
https://chromium.googlesource.com/chromium/src

Option 2
The software will suggest the user to open the following link:
chrome://flags/#calculate-native-win-occlusion

When you put the link in chrome, it will take you to here:
image

The software will suggest the user disable this feature:
image

Once the feature is disabled, we will no longer get issue #117

Update:

In the end, I did not use Option 1 and not Option 2.
I did Option 3. That is tricking chrome.
Option 3
See from
#146 (comment)

@gileli121 gileli121 added the task label Sep 14, 2021
@gileli121
Copy link
Member Author

Update:
More and more users complain about this issue.

I will have to implement something that the software will suggest this workaround until the bug will be fixed in chrome.

@gileli121
Copy link
Member Author

gileli121 commented Sep 21, 2021

EDITED

Technical solution removed to avoid Microsoft PowerToys losers to copy it one day

@gileli121 gileli121 changed the title Suggest the user to disable window occlusion for chrome when he shrink chrome window Issue that Google Chrome, Edge browsers disable video rendering when the window is in Shrink/PiP mode Sep 21, 2021
@gileli121 gileli121 changed the title Issue that Google Chrome, Edge browsers disable video rendering when the window is in Shrink/PiP mode Issue that Google Chrome, Edge browsers stop playing videos when the window is in Shrink/PiP mode Sep 21, 2021
@gileli121
Copy link
Member Author

gileli121 commented Sep 21, 2021

Build with the hotfix:
WindowTop Build 22-09-21_1.zip

This hotfix was implemented for the following chromium-based browsers:

  case "chrome.exe":
  case "msedge.exe":
  case "brave.exe":
  case "vivaldi.exe":
  case "epic.exe":
  case "slimbrowser.exe":
  case "dragon.exe":
  case "AvastBrowser.exe":

It working like a magic.
I will ask users to test it

@gileli121
Copy link
Member Author

This hack is not working right in Windows 10.
It working fine in Windows 11.

In Windows 10, there is a problem with the taskbar preview
image

@gileli121
Copy link
Member Author

gileli121 commented Sep 22, 2021

The following trick working without side effects

EDITED

Technical solution removed to avoid Microsoft PowerToys losers to copy it one day

@gileli121
Copy link
Member Author

It passed the tests in Windows 10 and Windows 11

@gileli121
Copy link
Member Author

gileli121 commented Sep 22, 2021

New build for testing:

WindowTop Build 14-09-22_1.zip

@gileli121
Copy link
Member Author

gileli121 commented Sep 24, 2021

The last version of the hack did not work perfectly after more testing.

Sometimes the video will be blank in the preview.

EDITED

Technical solution removed to avoid Microsoft PowerToys losers to copy it one day

@gileli121
Copy link
Member Author

gileli121 commented Sep 24, 2021

Released in v5.5.8

@gileli121 gileli121 changed the title Issue that Google Chrome, Edge browsers stop playing videos when the window is in Shrink/PiP mode Issue that Google Chrome, Edge, Brave and any chromium-based browser stop playing videos when the window is in Shrink/PiP mode Sep 24, 2021
@gileli121 gileli121 changed the title Issue that Google Chrome, Edge, Brave and any chromium-based browser stop playing videos when the window is in Shrink/PiP mode Issue that Google Chrome, Edge, Brave and any chromium-based browser stop playing videos when the window is in Shrink/PiP mode (Update: Hack found!) Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant