WebRTC 视频流无法通过 http 工作

WebRTC video streaming doesn't work through http

我正在尝试使用 WebRTC (Peer.js) 创建游戏。而且我无法通过 "http" 进行视频通话...也许它只能通过 https 进行? P.S。媒体通话的所有工作(我看到的)示例都使用 https!

1) http://cdn.peerjs.com/demo/videochat/ (doesn't work)
2) https://simplewebrtc.com/demo.html (works)

它不是 webrtc,但 getusermedia API 仅在安全来源 (https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins) 上受支持。

因此您可以使用本地主机在您的计算机上进行测试,但对于部署,您将需要 https。