Server-side consumer.observer.on(“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 consumer.observer.on(“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.