Skip to content

Commit

Permalink
fix: updated function that saves the global state
Browse files Browse the repository at this point in the history
  • Loading branch information
malmen237 committed Apr 10, 2024
1 parent 0797928 commit 81b42fe
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/production-line/use-rtc-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ const attachInputAudioToPeerConnection = ({
inputAudioStream,
rtcPeerConnection,
dispatch,
}: TAttachAudioStream) =>
}: TAttachAudioStream) => {
inputAudioStream.getTracks().forEach((track) => {
rtcPeerConnection.addTrack(track);
dispatch({
type: "CONNECTED_MEDIASTREAM_TRACK",
payload: track,
});
});
dispatch({
type: "CONNECTED_MEDIASTREAM",
payload: inputAudioStream,
});
};

const establishConnection = ({
rtcPeerConnection,
Expand Down

0 comments on commit 81b42fe

Please sign in to comment.