Make TrackLocalContext an interface
This allows external users to provide their own TrackLocalContext to be bound to a track.
Codecov Report
Patch coverage: 81.25% and project coverage change: -1.71% :warning:
Comparison is base (
6a3a97f) 79.42% compared to head (5f0e980) 77.72%.
Additional details and impacted files
@@ Coverage Diff @@
## master #2170 +/- ##
==========================================
- Coverage 79.42% 77.72% -1.71%
==========================================
Files 76 87 +11
Lines 8477 9374 +897
==========================================
+ Hits 6733 7286 +553
- Misses 1359 1657 +298
- Partials 385 431 +46
| Flag | Coverage Δ | |
|---|---|---|
| go | 79.49% <81.25%> (+0.07%) |
:arrow_up: |
| wasm | 70.23% <0.00%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files Changed | Coverage Δ | |
|---|---|---|
| rtpsender.go | 81.94% <80.00%> (ø) |
|
| track_local.go | 83.33% <83.33%> (+16.66%) |
:arrow_up: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
That's pretty interesting @kevmo314 !
Are you calling Bind yourself? I had only really thought is something that webrtc calls for the users.
Switching it from a struct to a pointer technically is API breakage
Let me check ion-sfu and mediadevices first to make sure we don't cause any problems (I hope not though)
Switching it from a struct to a pointer technically is API breakage
Let me check
ion-sfuandmediadevicesfirst to make sure we don't cause any problems (I hope not though)
I think because all the properties are private it shouldn't cause any breakages but I'll hold off, let me know when you're comfortable merging :)
I'm calling Bind() because I'm trying another approach to multihoming a track. Turns out using UDPMux didn't work very well and the interceptor API doesn't let me spawn new tracks easily
I tested pion/mediadevices, glimesh/broadcast-box and livekit/livekit (all users of TrackLocalContext)
This could have negative effects on users using reflection. I hope that this doesn't effect anyone. If it does reach out and happy to undo!
thanks
I second this change, but I believe we should migrate versioning rule to semver someday (bump MAJOR version when making incompatible API changes)