測試用 user
username: 123 password: 123
可在首頁看到其他人直播的存檔,並註冊及登入會員
至 Settings -> Stream 設定
可在直播頁面看見剛才設定的直播資訊,觀眾可以在直播期間留言與直播主互動(目前直播延遲約 30~40秒)
請參考: https://docs.docker.com/engine/install
git clone https://github.com/EshauHuang/ts-stream.git
frontend/.env.example
-> frontend/.env
# Setting up an Nginx server to get a m3u8 file using HTTP protocol. VITE_GET_STREAM_URL=http://localhost # Setting up an Api server to get video or stream HLS meta using HTTP protocol. VITE_API_SERVER_URL=http://localhost/api # Socket IO server VITE_SOCKET_URL=http://localhost
bakcend/.env.example
-> bakcend/.env
# Setting up an Nginx server to push a stream using RTMP protocol.(docker network IP) # 直播推播的 Nginx server 目前設定為此 App 的 Network IP(請見 `docker-compose.yml` 的 networks) STREAM_SERVER_URL=rtmp://172.23.0.1 # Setting up a key with CryptoJS allows you to generate or verify stream keys. # 欲使用測試 user 請使用此設定 SECRET_KEY=testtest # The domain of the server, used for CORS configuration to allow access from specific origins. # Node server 可接收的 domain SERVER_DOMAIN=http:/localhost
docker-compose.yml
nginx-reverse: environment: # 修改成自己網站的網域 SERVER_NAME: localhost
# 測試 docker-compose -f docker-compose.yml -f docker-compose.dev.yml build docker-compose -f docker-compose.yml -f docker-compose.dev.yml up ## 產品 docker-compose -f docker-compose.yml -f docker-compose.prod.yml build docker-compose -f docker-compose.yml -f docker-compose.prod.yml up
使用 alfg/nginx-rtmp,並稍作修改,主要作為串流的影片的輸出輸入
用於分配至不同 docker container