not working webRTC with public ip joining ;-;


when i am coding ( on ios ipad system version : 15 ) webRTC ( with socket-io ), in my server-side ( node.js + socket-io ) is not working. if join in localhost, it’s ok. but if join in like, then it doesn’t work.

How to fix????

my server code:

var app = require(“express”)()
var server = require(“http”).createServer(app)
var io = new require(“socket-io”)(server)

app.get(“/“, (req, res) => {
    res.sendFile(__dirname + “/index.html”)


in my index.html :

<!Doctype html>
       <meta charset=“utf-8”>
       <script src=“./socket-io.min.js”></script>
       <video autoplay></video>
           var socket = io()
           navigator.mediaDevices.getUserMedia({video: true})
              .then((stream) => {
                  document.querySelector(“video”).srcObject = stream

but when i tried to open the web-inspector, then it gives me an error : navigator.mediaDevices.getUserMedia is not an function

how to fix?


it may be ios problem or wi-fi problem…

Answered By – user19248178

Answer Checked By – Cary Denson (AngularFixing Admin)

Leave a Reply

Your email address will not be published.