Glimesh / broadcast-box

A broadcast, in a box.
MIT License
1.35k stars 70 forks source link

Publish Stream: support publishing a screenshare session instead of webcam? #32

Closed colemickens closed 9 months ago

colemickens commented 1 year ago

Just an idea on the back of #31. It seems like it would be in the spirit of the application to support broadcasting a getUserMedia thingy as an alternative to a webcam?

Sean-Der commented 1 year ago

@colemickens That sounds great!

Replace getUserMedia with getDisplayMedia. It would be nice to keep things low friction.

Maybe we do getUserMedia by default. We also provide a button that you can press to switch to getDisplayMedia instead?

heinrich5991 commented 9 months ago

Replace getUserMedia with getDisplayMedia. It would be nice to keep things low friction.

Maybe we do getUserMedia by default. We also provide a button that you can press to switch to getDisplayMedia instead?

That doesn't seem to work, it displays a red bar at the top:

Could not access your media device: InvalidStateError: getDisplayMedia requires transient activation from a user gesture.

Sean-Der commented 9 months ago

Hey @colemickens @heinrich5991

I added rough support for this. It requires that the source does Audio+Video (so display captures on MacOS does not work yet).

Tab capture works great though! I will finish the server generating silent audio tomorrow.

Sean-Der commented 9 months ago

This has been fully implemented @colemickens and @heinrich5991

Hopefully it works for your needs! If you have any feedback I would love to hear :)