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

not auto pause when window side by side #5

Open
zcw1030 opened this issue Dec 10, 2022 · 17 comments
Open

not auto pause when window side by side #5

zcw1030 opened this issue Dec 10, 2022 · 17 comments

Comments

@zcw1030
Copy link

zcw1030 commented Dec 10, 2022

hi, thx for your work on this extension, but i found one bug that.

for example, i have two windows side by side or stack on my screen, one is chrome, one is file explorer.
when chrome not focus, the "auto pause when window unfocus" not working. only if i minimize the chrome window to task bar, it will then auto pause.

environment: windows 10

@drodil
Copy link
Owner

drodil commented Dec 13, 2022

Could you take a screen recording of this issue? I could not reproduce it on my Win10 machine.

@sanjarcode
Copy link

Same issue for Ubuntu too

@sanjarcode
Copy link

sanjarcode commented Jan 29, 2023

Here's a work around. https://gist.github.com/sanjarcode/84815d472ade218b6da33db3c80c45ce
Until the issue is fixed.

@drodil
Copy link
Owner

drodil commented Jan 30, 2023

This seems to be a bug in the chromium itself: https://bugs.chromium.org/p/chromium/issues/detail?can=2&q=chrome.windows.onFocusChanged.addListener&colspec=ID+Pri+M+Iteration+ReleaseBlock+Cr+Status+Owner+Summary+OS+Modified&id=387377&thanks=387377&ts=1403370788

Not much I can do if not doing some custom logic to check for user inactivity in the window (which is not very good). In macintosh the event is fired correctly but for some reason it's not working in Windows.

@zcw1030
Copy link
Author

zcw1030 commented Jan 30, 2023

This seems to be a bug in the chromium itself: https://bugs.chromium.org/p/chromium/issues/detail?can=2&q=chrome.windows.onFocusChanged.addListener&colspec=ID+Pri+M+Iteration+ReleaseBlock+Cr+Status+Owner+Summary+OS+Modified&id=387377&thanks=387377&ts=1403370788

Not much I can do if not doing some custom logic to check for user inactivity in the window (which is not very good). In macintosh the event is fired correctly but for some reason it's not working in Windows.

thx

@knamnguyen
Copy link
Contributor

Hi, I made a pull request that fixed and added this feature. Side by side windows or even different monitors should work with this: #9

@zcw1030
Copy link
Author

zcw1030 commented Apr 3, 2024

Hi, I made a pull request that fixed and added this feature. Side by side windows or even different monitors should work with this: #9

thx !

@drodil
Copy link
Owner

drodil commented Apr 3, 2024

@zcw1030 please confirm the solution works for you so we can close this issue, thanks!

@zcw1030
Copy link
Author

zcw1030 commented Apr 3, 2024

sry, i tried, and still not working.

@zcw1030
Copy link
Author

zcw1030 commented Apr 3, 2024

here is a video i make to show the issue.
https://youtube.com/shorts/_YaHcnJg6Ww?si=hp1wQZeSYFrFmbtT

chrome on left, file explorer on the right.
when focus on file explorer, the video is not paused.

@drodil
Copy link
Owner

drodil commented Apr 3, 2024

Did you enable the new feature from settings?

@zcw1030
Copy link
Author

zcw1030 commented Apr 3, 2024

Did you enable the new feature from settings?

thx, now its kind of working, if i use mouse to change focus.
but if i use alt tab to change focus, its not working.

@drodil
Copy link
Owner

drodil commented Apr 3, 2024

Very weird, do you have these enabled:
image
I cannot reproduce this and alt+tab pauses the video fine for me. I am on MacOS with Chrome 123.0.6312.87

@zcw1030
Copy link
Author

zcw1030 commented Apr 3, 2024

Very weird, do you have these enabled: image I cannot reproduce this and alt+tab pauses the video fine for me. I am on MacOS with Chrome 123.0.6312.87

Yes, i have enable this two options.
image

@drodil
Copy link
Owner

drodil commented Apr 3, 2024

Hmm, somehow this does not work on Windows 😠 I don't have a machine to debug this at the moment. If you have skills to take a look, or anyone else with Windows machine, please feel free to check if this could be fixed. I will try to get my PC working again and check this out later if it's not possible. Thanks again for great reporting!

@zcw1030
Copy link
Author

zcw1030 commented Apr 3, 2024

Hmm, somehow this does not work on Windows 😠 I don't have a machine to debug this at the moment. If you have skills to take a look, or anyone else with Windows machine, please feel free to check if this could be fixed. I will try to get my PC working again and check this out later if it's not possible. Thanks again for great reporting!

thx for your hard work ! cheers

@Klimbar
Copy link

Klimbar commented Nov 20, 2024

can I request a feature where the youtube video will play and pause automatically based on whether the window is active or not. The current version works when the windows are out of view. But I want a feature that works on split screen. Like I like to keep youtube on one side and vs code on the other side, so that I can follow coding tutorials and whenever I am writing on vscode the youtube stops playing and vice versa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants