# Web browsers Web browsers can read a stream from the server with the [Media-over-QUIC](01-moq.md), [WebRTC](03-webrtc.md) and [HLS](06-hls.md) protocols, by accessing web pages hosted by the server. It is also possible to embed streams into an external website. ## Direct read ### Media-over-QUIC Visit the web page: ``` https://localhost:8892/mystream ``` Replace `mystream` with the path name. ### WebRTC Visit the web page: ``` http://localhost:8889/mystream ``` Replace `mystream` with the path name. Be aware that not all browsers can read tracks with any codec, check [Codec support in browsers](../2-features/25-webrtc-specific-features.md#codec-support-in-browsers). ### HLS The HLS protocol has a higher latency with respect to WebRTC, but there are fewer problems related to connectivity between server and clients. Visit the web page: ``` http://localhost:8888/mystream ``` Replace `mystream` with the path name. ## Embed in a website Live streams can be embedded into an external website by using the WebRTC or HLS protocol. Before embedding, check that the stream is ready and can be accessed with intended protocol by visiting web pages mentioned in the previous section. ### Media-over-QUIC in iframe The simplest way to embed a live stream in a web page, using the Media-over-QUIC protocol, consists in adding an ` ``` ### WebRTC in iframe The simplest way to embed a live stream in a web page, using the WebRTC protocol, consists in adding an ` ``` The iframe can be controlled by adding query parameters to the URL (example: `http://mediamtx-ip:8889/mystream?muted=false`). The following parameters are available: - `controls` (boolean): whether to show controls. Default is true. - `muted` (boolean): whether to start the stream muted. Default is true. - `autoplay` (boolean): whether to autoplay the stream. Default is true. - `playsInline` (boolean): whether to play the stream without using the entire window of mobile devices. Default is true. - `disablepictureinpicture` (boolean): whether to disable the ability to open the stream in a dedicated window. Default is false. The iframe method is fit for most use cases, but it has some limitations: - it doesn't allow to pass credentials (username, password or token) from the website to _MediaMTX_; credentials are asked directly to users. - it doesn't allow to directly access the video tag, to extract data from it, or to perform dynamic actions. ### WebRTC with JavaScript In order to overcome the limitations of the iframe-based method, it is possible to load the stream directly inside a `