teams-for-linux icon indicating copy to clipboard operation
teams-for-linux copied to clipboard

Feature Request - Red border when screen sharing

Open cs96and opened this issue 3 years ago • 25 comments

Is your feature request related to a problem? Please describe. The official Teams application puts a red border around your screen when you are screen sharing. teams-for-linux doesn't do this, so it's not obvious that the screen share is working. You may also forget that you are sharing your screen, and end up sharing private information.

Describe the solution you'd like teams-for-linux should put a red border around the screen that is being shared.

cs96and avatar Sep 27 '22 11:09 cs96and

It could be really complex. But see if we can this implemented.

jijojosephk avatar Sep 27 '22 14:09 jijojosephk

Yeah I wasn't sure how straightforward it would be, but at the moment there is absolutely no indication that you are currently sharing your screen.

cs96and avatar Sep 27 '22 15:09 cs96and

Looks like a difficult take. Would a notification be enough?

jijojosephk avatar Sep 27 '22 15:09 jijojosephk

Ideally there should be some sort of permanent notification showing, while you are sharing your screen.

cs96and avatar Sep 27 '22 15:09 cs96and

At least with Wayland/Gnome, there is an orange icon in the tray indicating what is being shared. Granted, much less subtle than a full red border, like on office teams application.

Krychle avatar Sep 27 '22 22:09 Krychle

@cs96and

As far as I know, the trick is to create browser window frame-less and transparent, and some additional tweaks. Since we're bound to use electron browser windows only, it may increase the memory usage. Also with the sharing of windows, we might not be able to track the location as the windows can be moved but the screens are not. The implementation can be gitchy.

My suggestions:

  1. Visual notifications at fixed intervals when the screen/window is being shared.
  2. Audio notifications at fixed intervals when the screen/window is being shared.
  3. Change in tray icon when the screen/window is being shared. (This might not work for all environments, we have already an open issue regarding tray icon does not show the notification count).
  4. All of the above with the flexibility to turn them on and off individually.

If we have an agreement, we can update the description of the defect and try implementing it.

jijojosephk avatar Oct 18 '22 08:10 jijojosephk

Closing due inactivity. Ping to reopen

IsmaelMartinez avatar Mar 22 '23 14:03 IsmaelMartinez

I was wondering about any visual hint while sharing my screen. When I use the official Teams app as installed Chrome app (PWA), then it shows a small white banner at the bottom of the screen saying that my screen is being shared.

This may be an easier solution compared to drawing a red border.

antimatter84 avatar Apr 04 '23 09:04 antimatter84

Just commenting here that I believe this should be re-opened so we can discuss ideas further.

psidhu avatar May 12 '23 04:05 psidhu

@IsmaelMartinez re-opened. Now @psidhu have your suggestions posted here please.

jijojosephk avatar May 12 '23 15:05 jijojosephk

The red border would be the best, but I understand that it is not trivial. Would the small white banner at the bottom of the screen like in the PWA version be simpler to implement? If yes, that would be also great.

From the suggestions made by @jijojosephk

@cs96and

As far as I know, the trick is to create browser window frame-less and transparent, and some additional tweaks. Since we're bound to use electron browser windows only, it may increase the memory usage. Also with the sharing of windows, we might not be able to track the location as the windows can be moved but the screens are not. The implementation can be gitchy.

My suggestions:

  1. Visual notifications at fixed intervals when the screen/window is being shared.
  2. Audio notifications at fixed intervals when the screen/window is being shared.
  3. Change in tray icon when the screen/window is being shared. (This might not work for all environments, we have already an open issue regarding tray icon does not show the notification count).
  4. All of the above with the flexibility to turn them on and off individually.

If we have an agreement, we can update the description of the defect and try implementing it.

option 3 sounds quite promising. Better than nothing. Options 1 and 2 could be quite disturbing during the sharing session.

starek4 avatar May 16 '23 09:05 starek4

can you put an screenshot as an example? Thanks!

IsmaelMartinez avatar May 16 '23 10:05 IsmaelMartinez

If I may, this is a mockup of the white banner from the PWA version:

image

antimatter84 avatar May 16 '23 10:05 antimatter84

That looks great @antimatter84 !

And totally awesome would be if we could move with it with the mouse. That would be best.

starek4 avatar May 16 '23 15:05 starek4

And the actual banner:

image

If I'm not mistaken, the left-most element looking like " | | " is probably for dragging it around with the mouse.

antimatter84 avatar May 17 '23 07:05 antimatter84

Thanks @antimatter84, like I said before, this can only be achieved by creating a new BrowserWindow instance which would increase the memory used during a call. The above floating window is created by the browser itself by using native windows and they're less resource hungry than a browser instance. Probably you can relate what I'm trying to explain. Can we do this? yes most likely but it would use up a extra memory. If everyone agrees, we can try it! @IsmaelMartinez what do you think?

jijojosephk avatar May 17 '23 07:05 jijojosephk

I will perform really badly, specially when it's during a screen sharing.

Electron has the BrowserView that is meant to be much better, but that will require quite a rewrite.

I got a wee branch trying to add chrome extensions, and that needs tabs that sort of needs the BrowserView.

I see if I can put a branch with some of it and we can iterate, but it will be a big change (hopefully for the better)

IsmaelMartinez avatar May 17 '23 07:05 IsmaelMartinez

Changing the colour of the icon might be easier, but it will not be as visible.

Or even replacing the "unread messages counter" with another icon will be easier

IsmaelMartinez avatar May 17 '23 07:05 IsmaelMartinez

@IsmaelMartinez BrowserView requires a BrowserWindow as parent. They're helpful if the app requires multi-tab support. A use case would be multi tenant support in the app.

jijojosephk avatar May 17 '23 08:05 jijojosephk

@IsmaelMartinez BrowserView requires a BrowserWindow as parent. They're helpful if the app requires multi-tab support. A use case would be multi tenant support in the app.

Yes, I mean then you use only one BrowserWindow instead of many. The BrowserWindow is most of the memory footprint we have.

But the BrowserView I think still an experimental feature.

IsmaelMartinez avatar May 17 '23 10:05 IsmaelMartinez

Another option that may not be so memory-hungry would be to edit the current notification:

Screenshot_20230830_105007

to read "Stop sharing windows 1", or "Stop sharing application X", possibly with even more information displayed when hovering.

As of now, there is no way of knowing what is currently shared, which is annoying. Anything, even subtle, would help in my opinion.

aubertc avatar Aug 30 '23 15:08 aubertc

Today I again shared something I did not want to my colleagues :smile:

Can we do at least a red tray icon? Or some red dot on it? Would help me. I have tried that, but I am not sure where in the code detects that sharing is active or nor.

starek4 avatar Sep 12 '23 09:09 starek4

That is the main issue, we don't know when the sharing starts and/or ends.

Unfortunately I can't look at it in MacOS as that functionality has never worked for me.

Maybe check around the https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/app/browser/tools/activityHub.js and see if MS does publish start/end screensharing events.

IsmaelMartinez avatar Sep 13 '23 11:09 IsmaelMartinez

Shouldn't the red border thingy be done by xdg-desktop-portal-wlr (or other portal depending on your WM ) ? As is this process that is being queried by electron to perform the actual choice of what is captured, and in charge of providing the buffers with the frames... That would make it easier to implement and useful for more use-cases ?

Just my 2cents

lecler-i avatar Sep 21 '23 06:09 lecler-i

That is the main issue, we don't know when the sharing starts and/or ends.

Unfortunately I can't look at it in MacOS as that functionality has never worked for me.

Maybe check around the https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/app/browser/tools/activityHub.js and see if MS does publish start/end screensharing events.

I am trying to move forward, but I am a bit stuck on my limited knowledge of Electron and front-end development.

So I have found out, that there is some event: image image

But when I try to log when the event happens, it does not log anything: image

Can someone with better knowledge about this point me what I am doing wrong?

starek4 avatar Sep 24 '23 22:09 starek4

This can't take us anywhere as the new version of the teams is in react and our efforts would be wasted. Hence closing this issue.

jijojosephk avatar Mar 12 '24 01:03 jijojosephk