mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-20 23:32:22 +08:00
新增webrtc播放器datachannel消息广播机制和接口
This commit is contained in:
@@ -353,6 +353,8 @@ public:
|
||||
cb(std::list<toolkit::Any>());
|
||||
}
|
||||
|
||||
virtual bool broadcastMessage(const toolkit::Any &data) { return false; }
|
||||
|
||||
// 获取媒体源类型
|
||||
MediaOriginType getOriginType() const;
|
||||
// 获取媒体源url或者文件路径
|
||||
|
||||
@@ -55,9 +55,16 @@ public:
|
||||
|
||||
void getPlayerList(const std::function<void(const std::list<toolkit::Any> &info_list)> &cb,
|
||||
const std::function<toolkit::Any(toolkit::Any &&info)> &on_change) override {
|
||||
assert(_ring);
|
||||
_ring->getInfoList(cb, on_change);
|
||||
}
|
||||
|
||||
bool broadcastMessage(const toolkit::Any &data) override {
|
||||
assert(_ring);
|
||||
_ring->sendMessage(data);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取播放器个数
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user