WebRTC视频流无法通过http工作

Иго*_*рев 2 javascript webrtc peerjs

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

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

man*_*shg 5

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

因此,您可以使用localhost在计算机上进行测试,但要进行部署,则需要https。