我正在尝试让WebRTC PeerConnection客户端在Ubuntu上与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的步骤在/home/myuser/.webrtc/
目录下编译了webrtc。
我有/home/myuser/.webrtc/trunk/out/(Debug/Release)
目录和peerconnection_client
可执行文件。接下来我克隆了https://github.com/santiago/node-peerconnection(另一种实现,包含一个makefile)。 当我尝试运行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
符号链接)。我注意到里面有一个 src 目录 (/usr/include/node/src/node.h
)。
我尝试过其他一些方法:
https://github.com/js-platform/node-webrtc
https://github.com/Raynos/peer-connection
基本上,我正在尝试让在我的计算机上编译的PeerConnection客户端与nodejs配合使用。
任何帮助将不胜感激;)谢谢