I’m either doing something wrong, or I found a bug.
I’m producing tracks this way:
MyInfo.producers[source] = await MyInfo.transports.sending!.produce({
stopTracks: false, // I tell mediasoup not to stop the tracks as per the docs https://mediasoup.org/documentation/v3/mediasoup-client/api/#ProducerOptions
track: stream.getTracks()[0],
appData: { source },
});
Thank you. After seeing the source, I understand. I think the docs are a bit unclear
Whether mediasoup-client should call stop() on tracks handled by this producer. If set to false , the app is responsible of stopping tracks given to transport.produce() or produce.replaceTrack() .
That implies that mediasoup will not manipulate the tracks at all (including pausing them). Maybe it should be clarified. I assumed that mediasoup just stop sending video data instead of pausing the stream when .pause() was called.
Honestly I don’t think you understand yet the difference between stopping and pausing a track. Please read the documentation of the MediaStreamTrack stop() method in the W3C site.