node.js - WebRTC PeerConnection 客户端 nodejs

标签 node.js ubuntu webrtc

我正在尝试让 ubuntu 上的 WebRTC PeerConnection 客户端与 nodejs 一起工作。

首先我尝试了 wrtc ( https://github.com/js-platform/node-webrtc )。我设法运行客户端,但我似乎无法获取数据流。我注意到此模块上的 RTCPeerConnection/PeerConnection 具有与我在 chrome 中运行时不同的功能/实现。所以我去寻找另一个 nodejs PeerConnection。

我试过: https://github.com/Rantanen/node-peerconnection

已编译版本报错:_ZN6webrtc17BitrateController23CreateBitrateControllerEv

我认为要让它正常工作,我必须在我的机器上编译 peerconnection。

我关注了http://www.webrtc.org/reference/getting-started并在目录中编译webrtc:/home/myuser/.webrtc/。 我有 /home/myuser/.webrtc/trunk/out/(Debug/Release)。 我有 peerconnection_client 可执行文件。

接下来我克隆了:https://github.com/santiago/node-peerconnection (另一种实现,带有 make 文件)。 当我尝试运行 makefile 时(make WEBRTC_ROOT_PATH=/home/myuser/.webrtc/trunk) 我收到错误:

src/node_peer_connection_client.h:9:18: fatal error: node.h: No such file or directory
 include <node.h>

我有 /usr/include/nodejs(和 /usr/include/node 符号链接(symbolic link))。我注意到里面有一个 src 目录 (/usr/include/node/src/node.h)。

我尝试过的其他事情:

https://github.com/js-platform/node-webrtc

https://github.com/Raynos/peer-connection

基本上,我正在尝试让一个已在我的机器上编译的 PeerConnection 客户端与 nodejs 一起工作。

任何帮助将不胜感激;) 谢谢

最佳答案

这看起来很有希望:https://github.com/vmolsa/webrtc-native

使用示例: https://github.com/vmolsa/webrtc-native/blob/master/examples/node2browser/index.js :

应用程序接口(interface):

WebRTC.RTCPeerConnection

WebRTC.RTCIceCandidate

WebRTC.RTCSessionDescription

WebRTC.RTCDataChannel

WebRTC.MediaStream

WebRTC.MediaStreamTrack

WebRTC.getUserMedia

WebRTC.getSources

关于node.js - WebRTC PeerConnection 客户端 nodejs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24778299/

相关文章:

node.js - Sequelize transaction 抛出错误时不进行回滚

ubuntu - 在 Linux -Ubuntu 服务器上启动 katalon Studio

google-chrome - WebRTC 连接 - 同时 STUN 和 TURN?

c++ - 将 native WebRTC 应用程序与 Visual Studio 链接

node.js - 是否可以将文件系统根目录和/或文档根目录设置为文件系统的某个子目录?

javascript - 使用 Node.js 创建网站

node.js - 多设备混合应用程序中未指定 NodeJs 的路径

ubuntu - 将 OpenCL.so 库添加到 makefile,我收到错误 "undefined reference to"

php - WideImage 无法在我的服务器上运行

webrtc - createMediaElementSource 播放但 getByteFrequencyData 返回全 0