mpyken / screenareashare Goto Github PK
View Code? Open in Web Editor NEWShare selected area of the screen in applications that do not support this, e.g. Teams.
License: MIT License
Share selected area of the screen in applications that do not support this, e.g. Teams.
License: MIT License
.\screen-area-share-1.3.2.Setup.exe --cw=1920 --ch=1080 --cx=0 --cy=0 --rx=3100 --ry=0 --freeze
For example , none of this commands are working.
Really a nice tool to use ! , But an parameter to add like max fps 60, 30 , 15 would be nice , while sharing code it would prevent fan to ramp up , just need 15 fps when sharing visual studio .
The latest release is missing the dmg
file for x64 macOS machines.
Can you please add it?
I've used the app on Windows where it works great, but I also wanted to use it on my Linux box. After installing the latest release, I launch it and find it doesn't work. The capture window has a black background.
After taking a look, it seems that the version of Electron being used in this project currently doesn't support transparency on my OS. But I did find this project that I was able to quickly run to verify that Electron can do transparency in later versions.
So I pulled down the source and started playing around with the Electron version. Currently the version in package.json is 12, and trying all the major versions after 12 I found that version 15 is the minimum version that works with my setup. At the time of writing, the latest version of Electron is 25.
Having solved the transparency issue, I tested the render window, only to find that it isn't getting the capture data from the capture window. Uncommenting the line mainWindow.webContents.openDevTools();
I was able to discover a runtime error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')
at selectSource (render.js:37)
at getVideoSources (render.js:25)
at async EventEmitter.<anonymous> (render.js:65)
After enabling more logging, I was able to determine that the objects returned from desktopCapturer.getSources({types:["screen"]})
did not have a populated display_id
property; thus the matching display isn't found in the first parameter of this call:
await selectSource(
inputSources.filter((is) => is.display_id === display.id.toString())[0],
display
);
Investigating further, I tried looking at the documentation for desktopCapturer
and it seems that in the latest Electron version, it is only accessible from the main thread (index.js), not from the browser (render.js). Looking at how it is used in the render.js file, it ultimately only needs to know the source.id
for the selectSource
function. Moving some of the code from render.js
to index.js
, I was able to finally see the source display ids, detect and handle the error all in the main thread:
find display 1881264395124802 @ {"x":0,"y":546,"width":1920,"height":1080}
screen:430:0, Screen 1: 3803340867
screen:429:0, Screen 2: 66
(node:33974) UnhandledPromiseRejectionWarning: Error: Cannot find source matching display 1881264395124802. Candidates: [
{
"name": "Screen 1",
"id": "screen:430:0",
"thumbnail": {
"isMacTemplateImage": false
},
"display_id": "3803340867",
"appIcon": null
},
{
"name": "Screen 2",
"id": "screen:429:0",
"thumbnail": {
"isMacTemplateImage": false
},
"display_id": "66",
"appIcon": null
}
]
Drat. Looks like the display.id
and source.display_id
don't match. This appears to be an Electron bug? (see https://stackoverflow.com/a/66772210). Yup, and here it is (opened way back in 2018, still open) electron/electron#15111 (comment). Specifically, one user had a clever workaround to fall back on screen name instead of display id. Added that to my changes in index.js and suddenly I am getting some capture! But it's capturing the wrong screen. I had to go into my display settings and make Screen 1 be my primary monitor (screen 2 was previously set to that) and now it works!
I'm going to clean up my changes and submit a PR after I have tested it on Windows and Mac as well (to make sure I haven't broken anything).
If I drag other window to the rendering window it cuts the capture, can this be fixed?
Is this expected to work with FancyZones ?
when I try to drag the capture area with Shift pressed, I don't see FancyZones highlighting the zone area.
Would be fantastic to have a click through feature like https://github.com/LorenzCK/OnTopReplica.
If a user is allowed on "Conference Tool" to interact with the shared window with mouse clicks, ScreenAreaShare does not reflect the input to target area.
Hi
on the releases page there is no asset for M1 macs. Maybe you can add my compiled version:
ScreenAreaShare-1.3.2-arm64.dmg
Thank you
I'm using the app with a wide screen (1) and an 4K HDMI dummy dongle (2). Screens are arranged as per below:
The resolution of the main screen is 3440x1440 and the dummy dongle is set to 1720x1166, exactly the area I want to share.
Once I use below command line, the rendering window is pushed to the dongle screen, but remains white.
screen-area-share.exe --cw=1720 --ch=1166 --cx=1720 --cy=0 --rw=1720 --rh=1166 --rx=3440 --ry=0
With below command line, the rendering window will be on the main screen and working. But once moved to the dongle screen, it shows the whole content of the main screen squeezed together.
screen-area-share.exe --cw=1720 --ch=1166 --cx=1720 --cy=0 --rw=1720 --rh=1166 --rx=0 --ry=0
It seems that multi screens are not supported, could you check?
Awesome app, thanks for coming up with this!
Unfortunately it's not working as expected when used in a remote desktop session (VMware Horizon). I can somehow define the capture and remoting areas, but I don't see any red border, nor do I see the the window as a selection when sharing in MS Teams.
Given the way these remoting protocols work, is this something that can be fixed at all?
Cheers!
Hi,
great tool!!!
I have problems fixing the capture screen at a desired location on a secondary monitor. My configuration looks like this with a ~17 inch internal laptop monitor and an external 55 inch monitor connected via dockingstation to the laptop:
x=0
|
|
- +----------------------+
^ | |
| | +----------------+ --- y=0
| | 55 inch | 17 inch | ^
2160 | | secondary screen | main screen | | 1080
px | | external monitor | laptop monitor | v px
| | +----------------+ -
v | |
- +----------------------+
|<-------------------->|<-------------->|
3840 px 1280 px
Without any changes in configuration, the tool works very well when starting via npm start
:
Now, I want to statically set the location of the capture screen to cover a certain area on the secondary screen (at startup of the tool). So, I adjust the following elements within src/index.js
:
const initCapRect = {
x: app.commandLine.hasSwitch("cx")
? parseInt(app.commandLine.getSwitchValue("cx"))
: null,
y: app.commandLine.hasSwitch("cy")
? parseInt(app.commandLine.getSwitchValue("cy"))
: null,
width: app.commandLine.hasSwitch("cw")
? parseInt(app.commandLine.getSwitchValue("cw"))
: 1280,
height: app.commandLine.hasSwitch("ch")
? parseInt(app.commandLine.getSwitchValue("ch"))
: 720,
};
const initRenderRect = {
x: app.commandLine.hasSwitch("rx")
? parseInt(app.commandLine.getSwitchValue("rx"))
: null,
y: app.commandLine.hasSwitch("ry")
? parseInt(app.commandLine.getSwitchValue("ry"))
: null,
width: app.commandLine.hasSwitch("rw")
? parseInt(app.commandLine.getSwitchValue("rw"))
: 1280,
height: app.commandLine.hasSwitch("rh")
? parseInt(app.commandLine.getSwitchValue("rh"))
: 720,
};
The shown default elements for x
, y
, width
and height
for both windows (except for x
and y
of the render window, as they should be set automatically) are changed to:
for capture
x=-2000
(in order to appear on the secondary screen)y=0
width=1920
height=1080
for render
width=1920
height=1080
After doing so, and restarting the tool via npm start
, the following effect shows:
question
Is there a way to locate the capture window on a defined position of the secondary screen with a size of 1920x1080 without loosing the border of the capture window?
When starting ScreenAreaShare
, both windows (for capture and for render) open at their user-desired locations on any screen, respective to their starting coordinates and size. Both screens will always be fully visible (as long as they are not bigger than the hosting screen). Both windows open on top of all other windows (which is standard for new applications on Windows OS).
Now, after presenting, I'd like to easily close the entire application (including the capture and the render window). As far as I know, there is no icon to do so. Neither on the capture window nor on the render window. So, I have to do the following in order to quit the application:
ScreenAreaShare
application<CTRL> + <C>
to send a sigint
signal<Y> + <RETURN>
to end the batch process and close the consoleWould it be possible to operate a small "close" icon on the top right of each window (capture and render windows) to be able to terminate the application?
If this is a bad idea, please tell me. Or is there already a way to comfortably quit the application's operation without fiddling with the console window (somewhere behind some other windows)? Maybe a hidden hotkey?
Is it possible to move out the red border outside the visible area so that the partisipants of ms teams dont see it?
and it can also a litte bit smaller too :>
but great work so far :D
Hey there,
I downloaded and started version 1.3.1 (with and without admin priv.). I get the mentioned two windows and can drag them both.
But the streaming window is always empty (completely white). I do not even get any control panels like a close button.
Do I need to start a Teams Call for showing the content?
Hi,
I am stuck in a screen recording permissions request loop.
Installed screen-area-share version 1.4.1 (screen-area-share-1.4.1-universal.dmg) on a MacBook (M1) running Sonoma 14.4.1
When I launch it, I get the prompt:
I click open settings and toggle screen-area-share to allow and it asks me to restart it (quit & reopen):
But then when it reopens (or if I launch it manually) it just prompts for missing permissions again.
Even a reboot does not help.
Any idea?
Thanks!
When starting ScreenAreaShare
, both windows (for capture and for render) open at their user-desired locations on any screen, respective to their starting coordinates and size. Both screens will always be fully visible (as long as they are not bigger than the hosting screen). Both windows open on top of all other windows (which is standard for new applications on Windows OS).
Now, the capure window is identified by a thick red border, so I don't need to see the render window in order to know e.g. what is being shown to other people looking at my shared screen. And for me, hosting the render window in my monitors reduces the available window space to work on things while presenting to the folks.
Why not minimizing the render window in those cases? Although I love the borderless rendering, I would like to be able to see a small icon (as standard at least on Windows application windows) on the top right of the render window to be able to minimize the render window. While it's content is still being transferred to people on the other side of the share.
Would it be possible to operate a small "minimize" icon to be able to put the render window out of local sight?
If this is a bad idea, please tell me. Otherwise I might be able to implement this, myself.
Is there any way that you can link the .exe file to a publisher?
Microsoft Defender SmartScreen prevented an unrecognized app from starting. We have a alot of security is place (Security Baseline for Defender, Endpoint in Intune.) were we can't overwrite to run the .exe
Publisher: | Unknown publisher
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.