Files
mediamtx/docs/2-publish/21-web-browsers.md
T
Alessandro RosandGitHub 580bfe86d3 refactor documentation (#5509)
expand "publish" and "read" pages into several subpages.
2026-02-25 22:37:50 +01:00

896 B

Web browsers

Web browsers can publish a stream to the server by using the WebRTC protocol. 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.