Comments (21)
如何解决的?我这边看应该是因为不支持https
from skyrtc-demo.
@zhonglu900505 求告知,随时@我,或者邮箱[email protected]
from skyrtc-demo.
@zhonglu900505 我遇到与你相同的情况,请问一下如何解决的,谢谢
from skyrtc-demo.
chrome如果不是https无法使用,使用https之后websocket也需要使用wss,然后问题来了,服务端怎么添加ssl支持呢?
from skyrtc-demo.
@darkicerain
server = require('https').createServer(options, app)
options 包含私钥 key 和证书 crt
from skyrtc-demo.
@zhonglu900505 想问下你最后是怎么解决的,问题和你的一样,换浏览器运行也不行
from skyrtc-demo.
skyrtc 这个包是不是不支持https 协议?
from skyrtc-demo.
@msyfls123 改成server = require('https').createServer(options,app)之后
直接连服务器都跑不起来了。
from skyrtc-demo.
@LointaineAIMEE options 是一个对象…… 跑不起来你看下报错是什么
我架起来是这样的,https://masy.site/webrtc/
from skyrtc-demo.
能发下你的代码么 @msyfls123
from skyrtc-demo.
我也改成https协议了,但是只改了server.js这段,是不是其它部分也要改? @msyfls123
from skyrtc-demo.
我当时的解决办法是用了nginx来做https,反向代理到nodejs的端口,nodejs的部分全部都http就行了,代码不用改,只需要配置好nginx就ok了
from skyrtc-demo.
server.js
var express = require('express');
var app = express();
var https = require('https');
var fs = require('fs')
var server = https.createServer({
key: fs.readFileSync('/path/to/your.key'),
cert: fs.readFileSync('/path/to/your.crt')
}, app);
var SkyRTC = require('skyrtc').listen(server);
index.html
//rtc.connect("ws:" + window.location.href.substring(window.location.protocol.length).split('#')[0], window.location.hash.slice(1));
rtc.connect("wss://" + location.hostname + ":3000/", window.location.hash.slice(1));
然后我还配了 Nginx 代理
location /webrtc/ {
proxy_pass https://127.0.0.1:3000/;
}
from skyrtc-demo.
新手没配置过Nginx...,谢谢啦,我去看看怎么配置 @darkicerain @msyfls123
from skyrtc-demo.
谢谢两位大哥了。我先按照你们说的看看。 @darkicerain @msyfls123
from skyrtc-demo.
我把项目部署到服务器上的时候也出现了这个问题。请问这个问题是所有浏览器都会出现还是只是chrome会出现呢?(本地测试了一下,所有的浏览器都会出现问题,问这个问题是想知道是我部署上的错误还是HTTPS导致的错误) @msyfls123 @darkicerain
from skyrtc-demo.
@norshtein 应该只有chrome会要求一定要https,我当时测试时是这样
from skyrtc-demo.
@msyfls123 发布的版本出错了
from skyrtc-demo.
@feifanyajun 重启了下...
from skyrtc-demo.
有人解决这个问题了吗?能否把源码发一下
from skyrtc-demo.
按F12就会发现出现了警告,insecure origin。
解决的办法是,找到chrome://flags,搜索insecure origins,找到如下图的选项。
Insecure origins treated as secure
enable此选项,然后在输入框中打入你要输入的IP:PORT。
重启生效。
第二种方法是,你为自己的域名设置https,可以使用Let's encrypt。
from skyrtc-demo.
Related Issues (20)
- server.js不能运行 HOT 7
- 局域网内可以互相访问,非同一内网的用户互相看不见 HOT 5
- 回声消除问题 HOT 1
- 加ssl不能运行 HOT 1
- 这个怎么打包发布到IIS服务器啊
- 求解答下!
- SyntaxError: Use of const in strict mode. HOT 1
- 进入页面提示 create stream failed! HOT 3
- navigator.mozGetUserMedia 火狐下不能使用创建流失败 HOT 2
- https问题 HOT 1
- 运行 node server.js 之后一直停留在那一行
- 非局域网无法聊天,视频,传文件
- 创建流失败。。都在同一局域网下还是不通 HOT 2
- 使用localhost地址,无法显示图像 HOT 1
- 无法显示视频和聊天 HOT 1
- 火狐浏览器最新版URL.createObjectURL(stream) 失败 HOT 1
- 如何配置https HOT 3
- 谷歌浏览器创建流失败 HOT 1
- 大家IOS推流出来成功了吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skyrtc-demo.