codysherman / 2nfm

Share your screen and computer's audio via WebRTC!
https://2n.fm
BSD 3-Clause "New" or "Revised" License
31 stars 16 forks source link

Streaming fails when page loaded from <ip>:8080 #103

Closed claysquareninety closed 4 years ago

claysquareninety commented 4 years ago

Works fine when using localhost:8080, but not when you use :8080

Streamer > Audio fails printing: TypeError: Cannot read property 'getAudioTracks' of undefined Streamer > Video fails silently

macOS 10.14, Chrome 80

sammoore commented 4 years ago

This is a intentionally imposed browser limitation -- since the API is at an https:// URL, the front-end needs to be hosted from an https:// URL, unless the hostname is localhost -- so there's really nothing we can do here short of setting up a non-encrypted API just for development purposes, or getting an HTTPS certificate for the front-end just for local development, which I don't think is really necessary.

Closing.