Skip to content

Commit

Permalink
Override sender getter on LocalVideoTrack (#1141)
Browse files Browse the repository at this point in the history
* Override sender getter on LocalVideoTrack

* Create giant-hairs-happen.md
  • Loading branch information
lukasIO authored May 15, 2024
1 parent b050c86 commit 266669f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/giant-hairs-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": patch
---

Override sender getter on LocalVideoTrack
6 changes: 5 additions & 1 deletion src/room/track/LocalVideoTrack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ export default class LocalVideoTrack extends LocalTrack<Track.Kind.Video> {

private degradationPreference: RTCDegradationPreference = 'balanced';

override set sender(sender: RTCRtpSender | undefined) {
get sender(): RTCRtpSender | undefined {
return this._sender;
}

set sender(sender: RTCRtpSender | undefined) {
this._sender = sender;
if (this.degradationPreference) {
this.setDegradationPreference(this.degradationPreference);
Expand Down

0 comments on commit 266669f

Please sign in to comment.