From 3fbd842ca836edbe4afd115eaa96c583af5f86fb Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Mon, 16 May 2022 14:32:52 +0200 Subject: [PATCH] update readme --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cb0eb131..068b4a6d 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,7 @@ Features: * [RTMP general usage](#rtmp-general-usage) * [HLS protocol](#hls-protocol) * [HLS general usage](#hls-general-usage) + * [Embedding](#embedding) * [Decrease delay](#decrease-delay) * [Links](#links) @@ -785,13 +786,21 @@ http://localhost:8888/mystream where `mystream` is the name of a stream that is being published. -The direct HLS URL, that can be used to read the stream with players (VLC) or Javascript libraries (hls.js) can be obtained by appending `/index.m3u8`: +### Embedding + +The simples way to embed a live stream into a web page consists in using an iframe tag: ``` -http://localhost:8888/mystream/index.m3u8 + ``` -Please note that most browsers don't support HLS directly (except Safari); a Javascript library, like [hls.js](https://github.com/video-dev/hls.js), must be used to load the stream. +Alternatively you can create a video tag that points directly to the stream playlist: + +``` + +``` + +Please note that most browsers don't support HLS directly (except Safari); a Javascript library, like [hls.js](https://github.com/video-dev/hls.js), must be used to load the stream. You can find a working example by looking at the [source code of the HLS muxer](internal/core/hls_muxer.go). ### Decrease delay