Cannot get PubNub WebRTC tutorial to work

*爱你&永不变心* 提交于 2019-12-02 03:22:18

WebRTC running on localhost HTTPS

You are looking to run your WebRTC demo locally on your laptop using localhost. You must use HTTPS. Here is a GIF video of your demo working using a locally secured webserver (included!). We cleaned up your video DOM/jQuery code and also corrected a few errors. You can find the HTML source for WebRTC Source Code on GitHub Gists.

Run WebRTC Demo Locally

These terminal commands will download the html file to your local box, create a PEM key for TLS crypto and run a local HTTPS server using Python.

curl https://gist.githubusercontent.com/stephenlb/edd4b0c218a72a34349baa004a80fd7a/raw/1b28c5e39db0d5eaabc10006cede0a8825b9afd4/webrtc-demo.html > webrtc-demo.html
python <(curl -L https://gist.githubusercontent.com/stephenlb/2e19d98039469b9d0134/raw/5afefc79647e0786097ca3406dbf93c5de919aed/https.py)

Then open and accept the local HTTPS connection (agree to unknown root CA warning).

open https://0.0.0.0:4443/webrtc-demo.html

Run the above command to test the demo.

Reference Links for WebRTC

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!