It seems that it would be tough.  How can you check if it’s happening in a 
browser?
And what if I move the window to the other monitor?

> On Jul 22, 2021, at 12:45 PM, Gabriel Zachmann via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
> 
> My questions is quite simple:
> is it possible to determine - in my own app - whether or not there is an MS 
> Teams video call taking place at the moment?
> 
> So far, i have been checking whether or not MS Teams is running by the 
> following snippet (omitting some of the safety guards):
> 
> let mainScreen = NSScreen.main
> let options : CGWindowListOption = [.excludeDesktopElements , 
> .optionOnScreenOnly ]
> let winArray = CGWindowListCopyWindowInfo(options, kCGNullWindowID) as? [[ 
> String : Any]]           
> let win_name : String = winInfo[kCGWindowName as String] as? String
>                                    ?? winInfo[kCGWindowOwnerName as String] 
> as? String
>                                    ?? "???"
> if ( win_name == "Microsoft Teams" ) 
>    increment counter for that VC Tool
> 
> This works pretty well for other kinds of VC tools, such as Zoom and Webex.
> 
> But with MS Teams, it does not quite work.
> 
> With other VC tools, there is usually two windows, the second one being 
> created only when an actual video call is occurring at the moment.
> Not so with MS Teams. It always has only one window.
> 
> The problem is that even if a video call is going on, the window's name is 
> only "Microsoft Teams".
> 
> So, I was wondering if there is any other method how I could detect whether 
> or not a video call in MS Teams is taking place.
> 
> 
> Best regards, Gabriel
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to