switch participant to interface
This commit is contained in:
+9
-1
@@ -41,7 +41,7 @@ func UnpackDataTrackLabel(packed string) (peerId string, trackId string, label s
|
||||
return
|
||||
}
|
||||
|
||||
func ToProtoParticipants(participants []*Participant) []*livekit.ParticipantInfo {
|
||||
func ToProtoParticipants(participants []Participant) []*livekit.ParticipantInfo {
|
||||
infos := make([]*livekit.ParticipantInfo, 0, len(participants))
|
||||
for _, op := range participants {
|
||||
infos = append(infos, op.ToProto())
|
||||
@@ -87,6 +87,14 @@ func FromProtoTrickle(trickle *livekit.Trickle) webrtc.ICECandidateInit {
|
||||
return ci
|
||||
}
|
||||
|
||||
func ToProtoTrack(t PublishedTrack) *livekit.TrackInfo {
|
||||
return &livekit.TrackInfo{
|
||||
Sid: t.ID(),
|
||||
Type: t.Kind(),
|
||||
Name: t.StreamID(),
|
||||
}
|
||||
}
|
||||
|
||||
func IsEOF(err error) bool {
|
||||
return err == io.ErrClosedPipe || err == io.EOF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user