Skip to content

Hosting HLS Media

Zibbp edited this page Aug 15, 2020 · 2 revisions

Hosting the HLS media

HLS uses HTTP meaning that it needs to be served over a web server. Below are some example.

  1. If you already have the RTMP to HLS container running, an environment variable can be passed through allowing you to serve static files by transferring the files to the directory (information can be found on the rtmp to hls page).
  2. Use an existing http server (nginx, apache, etc) or launch a docker container of one of those and then transfer the HLS files to the http server to be served.
  3. Use Caddy

If using Nginx, two lines may need to be added to the nginx.conf file to allow access control.

add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET';