RTC: Ensure private network requests are made from secure contexts #2787
Labels
Discussion
Discussion or questions.
TransByAI
Translated by AI/GPT.
WebRTC
WebRTC, RTC2RTMP or RTMP2RTC.
Won't fix
We won't fix it.
Milestone
Today I discovered that Chrome updated its security policy in July 2021, which caused the HTTPS player on the official website to be unable to play the SRS stream on the local network. Of course, this does not mean that it cannot be used at all. I will list which ones are working properly and which ones have issues (assuming your SRS local network IP is
192.168.11.172
):OK
: Local HTTP page plays HTTP API, it can also be opened locally for testing.OK
: Local network SRS HTTP page plays HTTP API, accessing the SRS on the local network is also possible.OK
: Local network SRS HTTPS page plays HTTPS API, self-signed certificates are also accepted during testing.OK
: Official website HTTPS page plays HTTPS API, this is the standard practice for providing services.FAIL
: Official website HTTPS page plays HTTP API, this is because HTTPS pages cannot access HTTP resources.FAIL
: Official website HTTP page plays HTTP API, this is because HTTP pages no longer support cross-origin requests.The last point is about playing SRS streams from an internal network using the official HTTP player. This issue is related to the security policy update made by Chrome a few months ago. If you open the console, you will see the following error message.
I have tried adding parameters to the page, but it didn't work.
Here is an alternative workaround: If you are only developing, debugging, and learning, you can follow the method taught by Darren, a teacher at Zero Sound Academy. Simply disable HTTPS and all security policies when starting Chrome, which works well.
If it is for online use, it is better to stick to HTTPS honestly.
References:
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: