SRS环境版本
commit 44f0c36b61bc7c3a1d51cb60be0ec184c840f09d
Author: winlin <winlin@vip.126.com>
Date: Wed Aug 2 10:34:41 2023 +0800Release v4.0-r5, 4.0 release5, v4.0.271, 145574 lines.
bug1: 无法推流
WebRTC推流必须是HTTPS或者localhost:HttpsRequiredError Please use HTTPS or localhost to publish, read https://github.com/ossrs/srs/issues/2762#issuecomment-983147576
WebRTC推流确实必须在HTTPS或localhost环境下进行,这是现代浏览器的安全策略要求。
解决: 把ip换成localhost通过 http://localhost:8080/players/rtc_publisher.html 访问
bug2: 推流过一会自动关闭会话。
解决:推流链接使用localhost会存在问题,应该使用虚拟机物理网卡IP:webrtc://192.168.126.129/live/livestream
后续拉流也要用物理网卡ip。