ionorg / ion-sfu

Pure Go WebRTC SFU
MIT License
980 stars 238 forks source link

v1.11.0: missing RID method #654

Open tomsun opened 2 years ago

tomsun commented 2 years ago

Your environment.

What happened?

When upgrading my setup to use ion-sfu v1.11.0 I get missing RID method at build time.

@Sean-Der seems to fix this 7 commits ahead of v.1.11.0, in 53cf929ff5f11241ed83cd1e2400c91370021439, but there is no tagged release yet that includes this fix.

# github.com/pion/ion-sfu/pkg/sfu
79/go/pkg/mod/github.com/pion/ion-sfu@v1.11.0/pkg/sfu/publisher.go:380:52: cannot use downTrack (type *DownTrack) as type webrtc.TrackLocal in argument to rp.AddTrack:
80  *DownTrack does not implement webrtc.TrackLocal (missing RID method)
81/go/pkg/mod/github.com/pion/ion-sfu@v1.11.0/pkg/sfu/publisher.go:428:18: impossible type assertion:
82  *DownTrack does not implement webrtc.TrackLocal (missing RID method)
83/go/pkg/mod/github.com/pion/ion-sfu@v1.11.0/pkg/sfu/relaypeer.go:137:52: cannot use downTrack (type *DownTrack) as type webrtc.TrackLocal in argument to rp.AddTrack:
84  *DownTrack does not implement webrtc.TrackLocal (missing RID method)
85/go/pkg/mod/github.com/pion/ion-sfu@v1.11.0/pkg/sfu/relaypeer.go:184:18: impossible type assertion:
86  *DownTrack does not implement webrtc.TrackLocal (missing RID method)
87/go/pkg/mod/github.com/pion/ion-sfu@v1.11.0/pkg/sfu/router.go:240:64: cannot use downTrack (type *DownTrack) as type webrtc.TrackLocal in argument to sub.pc.AddTransceiverFromTrack:
88  *DownTrack does not implement webrtc.TrackLocal (missing RID method)
OrlandoCo commented 2 years ago

@tomsun mm looks like the interface for TrackLocal changed, is a quick fix just required to create the RID method on Downtrack