docs/3-publish/16-web-browsers.md
Web browsers can publish a stream to the server by acting as a Media-over-QUIC client or a WebRTC client.
Start the server and open the web page:
https://localhost:8892/mystream/publish
The resulting stream will be available on path /mystream.
This web page can be embedded into another web page by using an iframe:
<iframe src="https://mediamtx-ip:8892/mystream/publish" scrolling="no"></iframe>
Start the server and open the web page:
http://localhost:8889/mystream/publish
The resulting stream will be available on path /mystream.
This web page can be embedded into another web page by using an iframe:
<iframe src="http://mediamtx-ip:8889/mystream/publish" scrolling="no"></iframe>
For more advanced setups, you can create and serve a custom web page by starting from the source code of the WebRTC publish page. In particular, there's a ready-to-use, standalone JavaScript class for publishing streams with WebRTC, available in publisher.js.