如何在 gae 上创建一个聊天室,有任何音频 python 框架可以做到这一点吗?
我想在 gae 上创建一个聊天室,(音频聊天)
有任何框架可以做到这一点吗?
谢谢
i want to make a chat room on gae ,(audio chat)
has any framework to do this ?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
App Engine 不直接支持任何类型的音频聊天,并且由于它基于(主要)HTTP 请求的请求响应系统,因此您无法自己实现它。
App Engine doesn't directly support audio chat of any sort, and since it's based around a request-response system with (primarily) HTTP requests, you can't implement it yourself.
尝试 Adobe Stratus(它适用于 p2p 连接),您只能使用 Google App Engine 来交换对等 ID。
Try Adobe Stratus (it works with p2p connections) and you could use Google App Engine only for exchanging peer ids.
如果您支持 Jingle 那么您所要做的就是传递 XMPP 数据包。有很多模块支持这一点。
If you support Jingle then all you have to do is pass the XMPP packets around. There's lots of modules that support that.
您需要两件事:
用于获取音频的浏览器插件。你可以在例如之上构建它。 http://code.google.com/p/libjingle/'>libjingle 的优点是跨平台并允许 P2P 通信,更不用说能够与任意其他 XMPP 端点通信了。或者您可以使用 Flash 来抓取音频并从您构建的服务器上反弹流(我认为尝试在 Flash 中为 P2P 执行 STUN 是不可能的),但这在 App Engine 中执行起来会非常棘手,因为您需要它是长期运行的。
一种在客户端之间获取信令消息的方法。您必须进行轮询,直到 Channel API 发布(很快)。
温和地说,这是一个棘手的大问题,但如果你做到了那就太棒了。
You'll need two things:
A browser plugin to get audio. You could build this on top of eg. http://code.google.com/p/libjingle/'>libjingle which has the advantage of being cross-platform and allowing P2P communication, not to mention being able to talk to arbitrary other XMPP endoints. Or you could use Flash to grab the audio and bounce the stream off a server you build (I think trying to do STUN in Flash for P2P would be impossible), but this would be very tricky to do in App Engine because you'd need it to be long-running.
A way to get signaling messages between your clients. You'll have to poll until the Channel API is released (soon).
This is a big hairy problem, to put it mildly, but it would be awesome if you did it.