Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow patching screenshare with video and audio devices #195

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ryanccn
Copy link
Contributor

@ryanccn ryanccn commented Oct 28, 2023

This is useful when loopback audio drivers or applications, such as BlackHole, are already installed.

@ryanccn ryanccn marked this pull request as ready for review October 28, 2023 15:43
@ryanccn ryanccn marked this pull request as draft October 28, 2023 16:24
@ryanccn ryanccn changed the title feat: allow patching screenshare with any audio device feat: allow patching screenshare with video and audio devices Oct 28, 2023
@ryanccn
Copy link
Contributor Author

ryanccn commented Oct 28, 2023

@Vendicated I need some help here, currently using a video device errors with TypeError: Video was requested, but no video stream was provided. Testing seems to indicate that patching isn't successful? The overridden navigator.mediaDevices.getDisplayMedia never gets called.

@ryanccn ryanccn force-pushed the screenshare-any-audio-device branch from 7b615f5 to 273606b Compare November 5, 2023 05:16
@ryanccn ryanccn force-pushed the screenshare-any-audio-device branch from 273606b to a62d162 Compare December 8, 2023 01:57
@ryanccn ryanccn force-pushed the screenshare-any-audio-device branch 2 times, most recently from 432c1d6 to fa5c6bd Compare January 7, 2024 01:57
@ryanccn ryanccn force-pushed the screenshare-any-audio-device branch 2 times, most recently from d23e730 to 1e7cbb8 Compare January 21, 2024 00:48
@RinLovesYou
Copy link

Behavior on linux is rather unpredictable.

Starting a stream using camera

Initial result is this error, and no stream starting.
image

Afterwards, pressing the "Go Live" button will immediately start the stream using the previously selected camera. Window picker does not appear.

venmic: !!v.audioSource && v.audioSource !== "None",
videoId: v.cameraId
});

Copy link

@OpaqueReptile OpaqueReptile Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just switched over to Linux/Vesktop and was looking for a solution like this!

I had to move patchDisplayMedia() outside of the above if-else block to get this to work. Still fails initially, but the streaming button afterwards will then grab the camera every time.

@ryanccn ryanccn force-pushed the screenshare-any-audio-device branch from 869d95a to 8ae191f Compare March 16, 2024 11:30
@LuminaSapphira
Copy link

Doesn't allow picking video patch on wayland - the modal is entirely skipped since the selection is done with the desktop portal instead of in the app.

@Vendicated
Copy link
Member

a lot has changed about the code since and now it has global state that it applies inside a getUserMedia patch. that'll likely solve your issues of only applying once! could you please rebase based on that?

@t1stm
Copy link

t1stm commented Jun 24, 2024

sorry for my useless comment, but this will make screen-sharing games on X11 finally bearable using my small tool (edit: i am talking as an NVIDIA proprietary driver user).

if the dev of this pr cannot currently / doesn't have the time to rebase it, would it be possible for me to do it?

@Novantric

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants