Skip to content

Commit

Permalink
fix: user_joined, video_offer 단계에서 새로운 localStream 생성하지 않게 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
today-is-first committed Nov 28, 2024
1 parent ab5cc86 commit 45ae825
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/states/store/signalingSocketStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const useSignalingSocketStore = create<ISignalingSocketStore>((set, get)

signalingSocket.on('user_joined', async ({ fromUserId, gsid }) => {
console.log('[Client][📢] user_joined', fromUserId, gsid);
const localStream = await getVideoStream();
const localStream = useLocalStreamStore.getState().localStream;
const { setRemoteStream } = usePeerConnectionStore.getState();
const peerConnection = createPeerConnection({
fromUserId,
Expand Down Expand Up @@ -85,7 +85,7 @@ export const useSignalingSocketStore = create<ISignalingSocketStore>((set, get)
});

signalingSocket.on('video_offer', async ({ offer, fromUserId, gsid }) => {
const localStream = await getVideoStream();
const localStream = useLocalStreamStore.getState().localStream;
const { setRemoteStream } = usePeerConnectionStore.getState();
const peerConnection = createPeerConnection({
fromUserId,
Expand Down

0 comments on commit 45ae825

Please sign in to comment.