Skip to content

Commit

Permalink
Return publication of Track.Source.Unknown in getTrack (#619)
Browse files Browse the repository at this point in the history
* Return publication of Track.Source.Unknown in getTrack

* Create .changeset/soft-bikes-lick.md
  • Loading branch information
lukasIO committed Mar 17, 2023
1 parent 2152c7e commit 937a538
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/soft-bikes-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": minor
---

Return publication of Track.Source.Unknown in getTrack
3 changes: 0 additions & 3 deletions src/room/participant/Participant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ export default class Participant extends (EventEmitter as new () => TypedEmitter
* @returns
*/
getTrack(source: Track.Source): TrackPublication | undefined {
if (source === Track.Source.Unknown) {
return;
}
for (const [, pub] of this.tracks) {
if (pub.source === source) {
return pub;
Expand Down

0 comments on commit 937a538

Please sign in to comment.