如何在red5上创建多个广播?
我已经安装了 red5,我可以通过连接到 rtmp://localhost/app 来获得 1 个广播公司,然后也可以通过连接到相同的 url 来获得订阅者。我还可以通过在每个订阅者上输入相同的 URL 将多个订阅者连接到同一广播公司。
我的问题是,如果我有多个广播公司,他们是否使用相同的 rtmp://localhost/app url 进行广播?订阅者如何选择他们不想订阅的广播公司?
I've installed red5 and I can get 1 broadcaster by connecting to rtmp://localhost/app and then a subscriber also by connecting to same url. I can also connect multiple subscriber to the same broadcaster by entering the same url on each.
My question is that if I have multiple broadcasters, do they use the same rtmp://localhost/app url to broadcast? How can the subscriber select which broadcaster they wan't to subscribe?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚发现我的问题的答案并不是真正的 red5,而是播放器本身。看来 NetStream 对象的发布方法将其第一个参数作为流的名称。同样,在订阅者上,播放方法也接受流名称。
因此,要拥有多个广播公司,我只需更改每个广播公司的流名称,订阅者就可以通过播放方法的流名称参数收听哪个广播公司。
I just found out that the answer to my question wasn't really in red5 but on the player itself. It seems that the NetStream object's publish method takes its first argument as the name of the stream. And likewise on the subscriber the play method also accepts the stream name.
So to have multiple broadcaster, I'll just have to change the stream name for each broadcaster and the subscriber can listen to which broadcaster through the play method's stream name argument.