From 266669ff994a56e9e38cfb965b5b8d411d75a74c Mon Sep 17 00:00:00 2001 From: lukasIO Date: Wed, 15 May 2024 17:49:12 +0200 Subject: [PATCH] Override sender getter on LocalVideoTrack (#1141) * Override sender getter on LocalVideoTrack * Create giant-hairs-happen.md --- .changeset/giant-hairs-happen.md | 5 +++++ src/room/track/LocalVideoTrack.ts | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/giant-hairs-happen.md diff --git a/.changeset/giant-hairs-happen.md b/.changeset/giant-hairs-happen.md new file mode 100644 index 0000000000..0dfc0a494c --- /dev/null +++ b/.changeset/giant-hairs-happen.md @@ -0,0 +1,5 @@ +--- +"livekit-client": patch +--- + +Override sender getter on LocalVideoTrack diff --git a/src/room/track/LocalVideoTrack.ts b/src/room/track/LocalVideoTrack.ts index 9108304f7c..f10ca11af3 100644 --- a/src/room/track/LocalVideoTrack.ts +++ b/src/room/track/LocalVideoTrack.ts @@ -55,7 +55,11 @@ export default class LocalVideoTrack extends LocalTrack { 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);