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

Make TrackLocalContext an interface #2170

Merged
merged 3 commits into from
Aug 3, 2023
Merged

Make TrackLocalContext an interface #2170

merged 3 commits into from
Aug 3, 2023

Conversation

kevmo314
Copy link
Contributor

@kevmo314 kevmo314 commented Apr 5, 2022

This allows external users to provide their own TrackLocalContext to be
bound to a track.

@kevmo314 kevmo314 requested a review from Sean-Der April 5, 2022 04:16
@codecov
Copy link

codecov bot commented Apr 5, 2022

Codecov Report

Patch coverage: 81.25% and project coverage change: -1.71% ⚠️

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%) ⬆️
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%) ⬆️

... and 14 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Sean-Der
Copy link
Member

Sean-Der commented Apr 5, 2022

That's pretty interesting @kevmo314 !

Are you calling Bind yourself? I had only really thought is something that webrtc calls for the users.

@Sean-Der
Copy link
Member

Sean-Der commented Apr 5, 2022

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)

@kevmo314
Copy link
Contributor Author

kevmo314 commented Apr 5, 2022

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)

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

@Sean-Der
Copy link
Member

Sean-Der commented Aug 3, 2023

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

This allows external users to provide their own TrackLocalContext to be
bound to a track.
@Sean-Der Sean-Der merged commit 8886e33 into master Aug 3, 2023
19 checks passed
@Sean-Der Sean-Der deleted the tl-interface branch August 3, 2023 18:12
@at-wat
Copy link
Member

at-wat commented Sep 1, 2023

I second this change, but I believe we should migrate versioning rule to semver someday (bump MAJOR version when making incompatible API changes)

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

Successfully merging this pull request may close these issues.

None yet

3 participants