BIG rewrite stream info

This commit is contained in:
Alex X
2024-06-15 16:46:03 +03:00
parent ecfe802065
commit 96504e2fb0
88 changed files with 1043 additions and 854 deletions
+1
View File
@@ -22,6 +22,7 @@ import (
"github.com/pion/rtp"
)
// Deprecated: should be rewritten to core.Connection
type Client struct {
core.Listener
+10 -5
View File
@@ -65,11 +65,16 @@ func (c *Client) Stop() error {
}
func (c *Client) MarshalJSON() ([]byte, error) {
info := &core.Info{
Type: "Bubble active producer",
Medias: c.medias,
Recv: c.recv,
Receivers: c.receivers,
info := &core.Connection{
ID: core.ID(c),
FormatName: "bubble",
Protocol: "http",
Medias: c.medias,
Recv: c.recv,
Receivers: c.receivers,
}
if c.conn != nil {
info.RemoteAddr = c.conn.RemoteAddr().String()
}
return json.Marshal(info)
}