Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fields ID, StartTime, and EndTime in UserDataPacket #545

Open
lemonlinger opened this issue Oct 17, 2024 · 0 comments
Open

Add fields ID, StartTime, and EndTime in UserDataPacket #545

lemonlinger opened this issue Oct 17, 2024 · 0 comments

Comments

@lemonlinger
Copy link

// UserDataPacket is a custom user data that can be sent via WebRTC on a custom topic.
type UserDataPacket struct {
Payload []byte
Topic string // optional
}
// ToProto implements DataPacket.
func (p *UserDataPacket) ToProto() *livekit.DataPacket {
var topic *string
if p.Topic != "" {
topic = proto.String(p.Topic)
}
return &livekit.DataPacket{Value: &livekit.DataPacket_User{
User: &livekit.UserPacket{
Payload: p.Payload,
Topic: topic,
},
}}
}

Can we add fields ID, StartTime, and EndTime in UserDataPacket ?These fields are already in protocol. See https://github.com/livekit/protocol/blob/37cb4c8b250d7dc12da1c288e961bde46c8fa15f/livekit/livekit_models.pb.go#L2265-L2293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant