nudge icon indicating copy to clipboard operation
nudge copied to clipboard

acceptableScreenSharingUsage does not see MS Teams screen share

Open swy opened this issue 3 years ago • 4 comments

Steps to replicate:

-Nudge on a device running < desired OS version, before installation deadline -Configured with acceptableScreenSharingUsage set to True -Share device screen into MS Teams meeting -run log show --style syslog --predicate 'subsystem == "com.apple.donotdisturb" && eventMessage CONTAINS "isScreenShared"'

Expected behavior: isScreenShared=1 would be seen in the log output, and that a device would not be Nuged to update during a Teams screen share. Observed behavior: isScreenShared=0 is seen, and Nudges will be presented during a screen sharing session.

For comparison, the same test was done but sharing via Zoom. In that situation, the log output is isScreenShared=1

While the failure to set the isScreenShared value seems to be a Teams shortcoming, this will lead to unexpected results for Nudge installations. Perhaps an alternate way to ask "is Teams sharing the screen?" could be created.

swy avatar Jun 09 '22 19:06 swy

I don't have any intentions of writing app specific code as it will continue to be a challenge. Can you try the acceptableAssertionUsage and see if teams works with that? That was written as a potential mitigation for badly behaving applications.

I would also file a bug report with Microsoft.

erikng avatar Jun 09 '22 23:06 erikng

PreventUserIdleDisplaySleep assertion should work, although I haven't tested with nudge directly, via pmset -g assertions I can see this being set by teams when starting a screen share:

2022-06-10 11:35:54 +0200
Assertion status system-wide:
[...]
   PreventUserIdleDisplaySleep    1
[...]
Listed by owning process:
   pid 000(Teams): [0x0000] 00:00:08 NoDisplaySleepAssertion named: "Electron"
[...]

Nothing4You avatar Jun 10 '22 09:06 Nothing4You

@Nothing4You PreventUserIdleDisplaySleep is set to 1 if you are just in a Teams meeting and not sharing your screen.

gsprague avatar Jun 10 '22 13:06 gsprague

@erikng With acceptableAssertionUsage true and acceptableAssertionApplicationNames set to "Electron" when Nudge is activated it will keep the Nudge window in the background. However, 1 minute later the Nudge window becomes the front most window. This is prior to the install date as well. Is there another setting we should be adjusting so the Nudge window doesn't active to the front 1 minute later?

gsprague avatar Jun 10 '22 18:06 gsprague