小编Fid*_*ido的帖子

navigator.getUserMedia 不是使用 WebRTC 的函数

我尝试与一些人建立视频组会议流,我使用 WebRTC(来自:https : //github.com/anoek/webrtc-group-chat-example),作为服务器,我使用安装了 node js 的 VPS Centos 7当我尝试启动我的 webrtc 服务器时,在浏览器中,我在使用端口访问 ip 时看到此错误

这个错误:

(index):260 Uncaught TypeError: navigator.getUserMedia is not a function
    at setup_local_media ((index):260)
    at Socket.<anonymous> ((index):50)
    at Socket.Emitter.emit (socket.io-1.4.5.js:3)
    at Socket.emit (socket.io-1.4.5.js:3)
    at Socket.onconnect (socket.io-1.4.5.js:3)
    at Socket.onpacket (socket.io-1.4.5.js:3)
    at Manager.<anonymous> (socket.io-1.4.5.js:3)
    at Manager.Emitter.emit (socket.io-1.4.5.js:3)
    at Manager.ondecoded (socket.io-1.4.5.js:2)
    at Decoder.<anonymous> (socket.io-1.4.5.js:3)
Run Code Online (Sandbox Code Playgroud)

JS代码:

 /*************/
    /*** SETUP ***/
    /*************/
   var express = require('express');
   var bodyParser = require('body-parser')
   var cors = require('cors')
   var main = express()
   main.use(cors())
   var server …
Run Code Online (Sandbox Code Playgroud)

websocket node.js webrtc simplewebrtc

1
推荐指数
1
解决办法
2775
查看次数

标签 统计

node.js ×1

simplewebrtc ×1

webrtc ×1

websocket ×1