“pause”, fn()) event is not emitting.

I am pausing the stream with producer.pause() method of client A and client B is consuming that video. on pausing client B is getting black frame of video, which is good but“pause”, fn()) event not emitting on client B. Am I doing anything wrong? or I have to use my own signaling to know that client A video has been paused.

Clarify whether you mean mediasoup or mediasoup-client.

Server-side“pause”, fn()) will only be fired when you call consumer.pause() or corresponding server-side producer is paused. If you pause client-side producer, it will just stop sending media, there will be no event on the server (but score will go down to 0 after a bit) or on client-side consumer.

Client-side“pause”, fn()) is only really fired when you call consumer.pause(), so documentation there could be improved indeed.

Also you have full access to source code, just go to Consumer.ts and see what can trigger pause event yourself.

If you pause client-side producer and want to know about this on the other client, you need to send this information somehow through signaling layer.

1 Like

I am using client-side consumer and now my doubt has been cleared. Thanks.

The documentation clearly says that those events must be signaled by the app. We can not clarify it for every event.