red5 - 从代码开始新范围
有没有办法从应用程序代码中启动 red5 中的新范围(房间)(通常,如果用户连接到路径,它们会自动启动)。我尝试过:
IScope scope = new Scope(roomName);
application.start(scope);//application is my class, extended from ApplicationAdapter
对 application.start
的调用返回 false,这意味着无法启动作用域(来自 javadocs),但我不知道为什么。
Is there a way to start a new scope (room) in red5 from the application code (normally they are started automatically if a user connects to the path). I tried:
IScope scope = new Scope(roomName);
application.start(scope);//application is my class, extended from ApplicationAdapter
the call to application.start
returns false, which means the scope could not be started (from the javadocs) but I have no idea why.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
稍后编辑:已解决 - 为了添加新范围,您需要调用
application.getAppScope().createChildScope(roomName);
(其中 getAppScope 将返回传递到中的应用程序的应用程序范围>appStart()
)Later edit: solved - in order to add a new scope, you need to call
application.getAppScope().createChildScope(roomName);
(where getAppScope would return the application scope passed into the application inappStart()
)