top | item 42269897

Show HN: Screen Sharing in the Browser

219 points| tonghohin | 1 year ago |github.com

Seeing all the hype around Bolt.new, I decided to give it a try, and within just 30 minutes, I built a fully functional web app for screen sharing.

How It Works:

- One user opens a room and receives a unique code.

- Participants join by simply entering the code to view the shared screen.

After that initial build, I moved the project to Cursor to continue iterating and enhancing its features.

Github: https://github.com/tonghohin/screen-sharing

Demo: https://share-your-screen.vercel.app

53 comments

order

thrdbndndn|1 year ago

Did a quick test on Demo site. It works like a charm.

One issue: when I stopped sharing, my audience (my another computer) can still see my shared screen (I assume the last frame), what I think it shouldn't. And there is no indication or whatsoever that I have stopped sharing.

tonghohin|1 year ago

Thanks for the feedback! I’ll check out the issue. It still has a lot to improve!

atmanactive|1 year ago

Great! Thanks.

While we're on the subject of WebRTC, if anyone would need MIDI over WebRTC, here is my take on it:

https://github.com/AtmanActive/webmidi-rtc-transport

Ylpertnodi|1 year ago

Perfect timing! Seems to suit (some of) my needs, thanks. And +1 for mentioning sonobus - that's a lot of fun, too.

ghusbands|1 year ago

Browser-based screen sharing is the subject. Is it normal to advertise unrelated projects in HN comments?

mvkel|1 year ago

What I love about developing with cursor et al is it forces devs to keep the app simple.

No custom UI bloat when shadcn will do; no feature creep when the outline is fulfilled.

Simple apps < 30,000 LOC means cursor can keep the code base in the context window, so its generations stay high quality.

low_tech_love|1 year ago

Slightly off-topic, but I’ve been searching for a long time for something like this, but for text chat: go to a website; create a room; share a code/link with others; people join and chat; then at some point in the future the room simply disappears (you can save a log if you want). Ideally anonymous with the best possible cryptographic implementation.

Has anyone stumbled upon something similar? I hate having to register and login to every chat platform, especially bloated ones like Discord and Slack. The closest one to what I want is gitter but it requires a GitHub signin.

jckahn|1 year ago

I built exactly what you’re describing: https://chitchatter.im/

It’s decentralized, serverless, anonymous, private, ephemeral, and open source.

jeroenhd|1 year ago

I think https://call.element.io/ works like that. Calls are encrypted and the client includes screen sharing and all the standard video conferencing features.

Jitsi Meet is also a classic example of this, though these days it requires at least one logged-in "moderator" user to work.

akshayKMR|1 year ago

Mine is a work in progress, but chat should work just fine. Let me know if you have any questions/concerns.

https://oorja.io/

click create space -> choose proceed as anonymous -> In your space, use chat or other apps. It's end to end encrypted (using the hash-frag in url as key, AES-128 bit GCM)

moonandstars|1 year ago

The reason why this doesn't usually exist is because anonymous text sharing is almost immediately taken over by people using it to do crimes. So be aware of that.

cess11|1 year ago

Do some Phoenix tutorials and you have your own.

tonghohin|1 year ago

Just deployed a new feature, audio can also be shared now! But it's only supported in Chrome and Edge, and users must select the option to share a tab. It won't work for sharing a window or whole screen.

sgrodnik|1 year ago

I'm not sure, but is it possible to make it work on Android? I've tried on my pixel 7a, it gave me the code, I pasted it in another device in Safari, but it was only Loading... on the button.

tonghohin|1 year ago

Yeah, it's not working that well on phones right now, working on it...

mandeepj|1 year ago

Gave it a quick run! Works great. The notification to share your screen goes away quickly. Is there any way to get back to it? I generated a new code to fire the notification again.

tonghohin|1 year ago

I just fixed that, the share button should stay forever now until you click it.

IshKebab|1 year ago

If you can get remote control to work that would be amazing. I assume that's impossible with current browser APIs though. A real pain point of Google Meet.

atoav|1 year ago

I too yearn for the day where my parents webbrowser can run Win+R and delete their System32 directory after they clicked "Ok" on a prompt whose message they wouldn't be able to tell me if I paid them a billion Euros for it.

1oooqooq|1 year ago

why the source have an accordion and carousel component? :)

ddtaylor|1 year ago

Are you talking about in components/ui? If so that's ShadCN and it works by fetching components and copy/pasting them into your project rather than trying to continue to keep the components up to date.

tonghohin|1 year ago

don't know why Bolt.new downloaded all the shadcn components for me lol

yroc92|1 year ago

Does this share your screen across domains? If so, how?

tonghohin|1 year ago

No, it doesn't share across domains.

typeofhuman|1 year ago

Would be great if I could share a URL to the room, instead of a room code.

tonghohin|1 year ago

Thanks for the idea! I just made that feature!

reynaldi|1 year ago

Awesome demo! Are you paying for the TURN server?

tonghohin|1 year ago

No, it's not using TURN server now.

lopkeny12ko|1 year ago

Immediately upon loading the homepage:

> Application error: a client-side exception has occurred (see the browser console for more information).

tonghohin|1 year ago

I guess you visited the page right after a new deployment. This happens sometimes due to a version mismatch in Next.js after deployment. Refreshing the page should fix it!

antback|1 year ago

It works great!! I Like it!

humptybumpty|1 year ago

-

kapitanjakc|1 year ago

For mobile I find google meet the best, I think even Whatsapp is now allowing to screen share.

anduc|1 year ago

wow, I didn't know this was possible