Hi all.
We ran into a bug and I’d like to determine if the problem is with our logical flow or if the error comes from somewhere else.
From the Mediasoup docs, which are usually on point, I am making two assumptions about pause/resume.
- It does not matter which side calls pause / resume first - client or server
- Consumers are automatically paused and resumed if their producer pauses / resumes
With these assumptions, I think this logic would be legal:
- Client-side producer is paused
- Server-side producer is paused
- Client-side consumers are paused
- Client-side producer.replaceTrack is called with a new MediaStreamTrack
- Client-side producer is resumed
- Server-side producer is resumed
At step 6 we get an InvalidStateError (Channel is closed) and the worker closes
My question is, should this in fact work or did I misunderstand something about the pause/resume process?
Cheers!