SRS環境版本
commit 44f0c36b61bc7c3a1d51cb60be0ec184c840f09d
Author: winlin <winlin@vip.126.com>
Date: ? Wed Aug 2 10:34:41 2023 +0800? ? Release 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。