Skip to content

Commit

Permalink
fix: should wait for local or remote offer
Browse files Browse the repository at this point in the history
  • Loading branch information
GhenadieVP authored and xstelea committed Feb 24, 2023
1 parent 1487a9f commit e426833
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/connector/webrtc/ice-candidate-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,15 @@ export const IceCandidateClient = (input: {
)
)

const haveLocalOffer$ = subjects.onSignalingStateChangeSubject.pipe(
filter((value) => value === 'have-local-offer')
)

const haveRemoteOffer$ = subjects.onSignalingStateChangeSubject.pipe(
filter((value) => value === 'have-remote-offer')
)
const waitForRemoteDescription$ = merge(
haveLocalOffer$,
haveRemoteOffer$,
subjects.onRemoteAnswerSubject
)
Expand Down

0 comments on commit e426833

Please sign in to comment.