Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-stasiak committed Jul 4, 2024
1 parent e5a43e2 commit b89cf0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ts-client/src/webrtc/transceivers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ export const getMidToTrackId = <EndpointMetadata, TrackMetadata>(

// - negotiated unmuted tracks: tracks added in previous negotiation, data is being transmitted
// - not yet negotiated tracks: tracks added in this negotiation, data will be transmitted after successful negotiation
const transceiver = getTransceiverMapping(connection, localTrackIdToTrack)
const mappingFromTransceivers = getTransceiverMapping(connection, localTrackIdToTrack)

// - negotiated unmuted tracks: tracks added in previous negotiation, data is being transmitted
// - negotiated muted tracks: tracks added in previous negotiation, data is not being transmitted but can be transmitted in the future
const allNegotiated = getAllNegotiatedLocalTracksMapping(midToTrackId, localEndpoint)
const mappingFromLocalNegotiatedTracks = getAllNegotiatedLocalTracksMapping(midToTrackId, localEndpoint)

return { ...transceiver, ...allNegotiated };
return { ...mappingFromTransceivers, ...mappingFromLocalNegotiatedTracks };
};

const getTrackContext = <EndpointMetadata, TrackMetadata>(localTrackIdToTrack: Map<RemoteTrackId, TrackContextImpl<EndpointMetadata, TrackMetadata>>, localTrackId: string) => Array.from(localTrackIdToTrack.values()).find(
Expand Down

0 comments on commit b89cf0f

Please sign in to comment.