Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).

Peerserver

Jin_L_
Beginner
920 Views

I have changed the Peerserver.js by using the generated server.key and server.crt.

The "localhost/CS_WebRTC_Client_SDK_JavaScript.v3.0/samples/p2p/peercall.html" works fine in Chrome,

but  "192.179.1.79/CS_WebRTC_Client_SDK_JavaScript.v3.0/samples/p2p/peercall.html" is still complaining  

getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
woogeen.sdk.js:8 ERROR: create LocalStream failed: Objectcode: 1101msg: "PERMISSION_DENIED"__proto__: Object

My question is how do i know if the Peerserver server used the server.key and server.cst? If yes, how to solve this problem?

Here is my modified code for the Peerserver.js, i put server.key and server.crt in the same directory as Peerserver.js

var servers = require("https").createServer(
{
 key  : fs.readFileSync('server.key'),
 cert : fs.readFileSync('server.crt')
 }, app).listen(config.port.secured);

 

Thanks

 

0 Kudos
3 Replies
Chunbo_H_Intel1
Employee
920 Views

You’ll need to deploy your HTML page in a secure web server. For example, an apache server with SSL enabled.

0 Kudos
tony_j_1
Beginner
920 Views

we deployed the https server,

error is following:

socket.io.js:2 Mixed Content: The page at 'https://192.168.20.129:444/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://192.168.20.171:8095/socket.io/?clientType=Web&clientVersion=3.1&token=aa&EIO=3&transport=polling&t=1461129092475-4'. This request has been blocked; the content must be served over HTTPS.

 

0 Kudos
Chunbo_H_Intel1
Employee
920 Views

Shortly, replace “http://192.168.20.171:8095/” with “https://192.168.20.171:8096/”.

For detailed reason of this error, please refer to https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content.

Thanks!

0 Kudos
Reply