Glimesh / broadcast-box

A broadcast, in a box.
MIT License
1.41k stars 76 forks source link

No idea what "Publish Stream" does #31

Closed colemickens closed 10 months ago

colemickens commented 1 year ago

Sorry if I'm just being kind of dumb, but I can't figure out what the "Publish" feature is supposed to be?

I figured maybe it was to broadcast a webcam/screen share from the browser? Maybe it's just not working for me?

Chat-mots commented 1 year ago

@colemickens The publish feature is for broadcasting your camera and microphone. It's a bit confusing at first I agree. When you publish your webcam at http://mybroadcastbox.box/publish/mykey, people can see you if they go to http://mybroadcastbox/mykey. You're publishing with the mykey key.

I think a message once you start broadcasting saying "LIVE : Currently streaming your camera and microphone to http://mybroadcast.box/mykey" would help.

Sean-Der commented 1 year ago

That’s a cool idea @Chat-mots!

you should implement! I would love to help if you have any questions

Chat-mots commented 1 year ago

@Sean-Der I'll try ! I wanted to do this but I've almost never used javascript and I need to figure how it works before I can push any thing :)

Sean-Der commented 1 year ago

@Chat-mots Great!

To start try adding a <h1> here like this.

<>
  <h1> My Test Message </h1>
      <video
      ref={videoRef}
      autoPlay
      muted
      controls
      playsInline 
      className='container mx-auto h-full'
    />
</>

If that doesn't look right you can also try in header

How to run is documented here best of luck!

I am available on Slack anytime. I do everything possible to support contributors :)

colemickens commented 1 year ago

Maybe my confusion is simply stemming from the fact that I don't have a webcam, and the page sorta doesn't specially handle that case? For me, when I go to the publish page, I get a blank video player...

screenshot-1692582125

makindotcc commented 1 year ago

Maybe my confusion is simply stemming from the fact that I don't have a webcam, and the page sorta doesn't specially handle that case? For me, when I go to the publish page, I get a blank video player...

Exactly, that is the case. I've tested now on my macbook with restricted camera access for chrome on macOS level and I have the same issue. broadcast box screenshot with devtools showing "DOMException: Requested device not found"

We should handle exceptions here: https://github.com/Glimesh/broadcast-box/blob/51c0655751995ab790bd6778ccc4a2a855f49916/web/src/components/publish/index.js#L12 specified at https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia

I'm going to pr simple error handler.

Sean-Der commented 1 year ago

Any luck with this @colemickens ?