getTrackById

The getTrackById() method of the MediaStream interface returns a MediaStreamTrack object representing the track with the specified ID string.

MDN Reference