ojack / hydra-standalone

Standalone version of hydra running in Electron
GNU Affero General Public License v3.0
26 stars 12 forks source link

getting rid of the "sharing tab" popup in chrome #30

Closed kaosbeat closed 11 months ago

kaosbeat commented 11 months ago

When sharing a tab to hydra, I get this annoying popover saying that I'm sharing a tab.

I tried to get rid of it, but it seems you need to do this when calling

getDisplayMedia() is this doable to integrate this as an option in hydra? or default it to off? (maybe not desired) more info >>> https://developer.chrome.com/docs/web-platform/screen-sharing-controls/#surfaceSwitching

ojack commented 11 months ago

hmmm, I haven't been able to have it not show the popover --- do you have a minimal example showing how to do this? If it is possible, it would be great to default to off in hydra-synth!

On Sat, Oct 14, 2023 at 7:31 PM Kasper Jordaens @.***> wrote:

When sharing a tab to hydra, I get this annoying popover saying that I'm sharing a tab.

I tried to get rid of it, but it seems you need to do this when calling

getDisplayMedia() https://developer.mozilla.org/docs/web/api/mediadevices/getdisplaymedia is this doable to integrate this as an option in hydra? or default it to off? (maybe not desired) more info >>>

https://developer.chrome.com/docs/web-platform/screen-sharing-controls/#surfaceSwitching

— Reply to this email directly, view it on GitHub https://github.com/ojack/hydra-standalone/issues/30, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFOVSPSPCRPPQAVLZG6ZNTX7LD6ZANCNFSM6AAAAAA6AMPV3M . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kaosbeat commented 11 months ago

It seems I misread the API, it's only hiding the "share other tab" button inside of the popover. Seems not possible, but I found have a workaround. It works fine on linux (ubuntu) but might not work exactly the same way on other linux distros. You basically start a chrome without tabs and location bar and hide its window decorations in your operation system. steps:

  1. start a chrome using the 'app' flag and your desired URL /opt/chrome-linux/chrome --app="https://www.kaotec.org"
  2. runxprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"to remove window decorations. You have to click inside the window chrome after you run the command
  3. open hydra in a different window and run initScreen() image pick the window, not the tab!
  4. everything should be shared without the popover, works in fullscreen too! image