PeerJS wraps the WebRTC implementation to provide a complete,
configurable, and easy-to-use peer-to-peer data API. Each peer simply
provides a identifier with which other peers using the same API key
can connect.
If you want to learn from existing code, I have started a few months ago a project that is using RTMFP (Adobe Cirrus) as communication between the peer connected to the service. If you want to take a look at it, it's available here. I haven't got time to do much documentation so far on it, but if you have question, you can ask them to me on github.
If you want to start with smaller example, I have done a JS interface that enables you to use the P2P connection with Javascript.
发布评论
评论(7)
今天我在 Hackernews
http://peerjs.com/
上发现了这个,在他们的页面上他们说:
听起来真的很有趣,我必须尝试一下:D
Today I found this on Hackernews
http://peerjs.com/
On their page they state:
Sounds really interesting, I have to try this :D
WebRTC 很快就会解决这个问题。它是 W3C 标准,目前已集成到所有浏览器中。
http://www.webrtc.org/
http://www.webrtc.org/running-the-demos
http://www.w3.org/TR/webrtc/
WebRTC will be the answer for this soon. It is a W3C standard and is currently being integrated into all browsers.
http://www.webrtc.org/
http://www.webrtc.org/running-the-demos
http://www.w3.org/TR/webrtc/
您正在寻找的技术称为 Adobe Cirrus(以前称为 Adobe Stratus),
这使您能够使用Flash播放器实现p2p通信。然后从 javascript 调用它是一件简单的事情。
The technology you are looking for is called Adobe Cirrus (previously known as Adobe Stratus)
This enables you to achieve p2p communication using the Flash player. It would be a simple matter to then call that from javascript.
如果您想从现有代码中学习,几个月前我启动了一个项目,该项目使用 RTMFP (Adobe Cirrus) 作为连接到服务的对等点之间的通信。如果您想查看它,可以在此处获取。到目前为止我还没有时间做太多的文档,但是如果你有疑问,你可以在 github 上向我提问。
如果您想从较小的示例开始,我已经完成了一个 JS 接口,使您能够使用 Javascript 进行 P2P 连接。
If you want to learn from existing code, I have started a few months ago a project that is using RTMFP (Adobe Cirrus) as communication between the peer connected to the service. If you want to take a look at it, it's available here. I haven't got time to do much documentation so far on it, but if you have question, you can ask them to me on github.
If you want to start with smaller example, I have done a JS interface that enables you to use the P2P connection with Javascript.
这可能不完全相关,但如果您希望它与 iphone/ipad 兼容,那么 websockets 可能对您来说很有趣
http://en.wikipedia.org/wiki/WebSockets
http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-today/
This might not relate exactly, but websockets might be something interesting to you, if you want it to be iphone/ipad compatible
http://en.wikipedia.org/wiki/WebSockets
http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-today/
我还没有尝试过,但是 anansi 可能是一个很好的起点。需要 Node.js
两个 “感谢”部分中的链接绝对值得一看。
I haven't tried it yet, but anansi might be a good starting point. Requires Node.js
The two links in the "Thanks To" section are definitely worth looking at.
或者,如果您在浏览器中需要纯 javascript 客户端并愿意为此付费,请查看...
http:// www.pubnub.com/
Or if you need a javascript-only client in the browser are willing to pay for it, check out...
http://www.pubnub.com/