Open mumuan opened 3 years ago
Hello @mumuan when you say you are stopping the Share screen, are you stopping the transceiver and causing a renegotiation?
Hello @mumuan when you say you are stopping the Share screen, are you stopping the transceiver and causing a renegotiation?
Hey @OrlandoCo I am stopping the Share screen from client.
Client SDK Version: ion-sdk-js 1.7.2
//_unpublish in my client
_unpublish = async stream => {
if (stream) {
await this._stopMediaStream(stream);
await stream.unpublish();
// console.log('unpublish localstream or shareStream',stream);
}
};
// unpublish in ion-sdk-js , /lib/stream.js
unpublish() {
if (this.pc) {
const tracks = this.getTracks();
this.pc.getSenders().forEach((s) => {
if (s.track && tracks.includes(s.track)) {
this.pc.removeTrack(s);
}
});
}
}
Hey @OrlandoCo I have sloved this issue. There are two reasons for this issue:
How to fix ?
Your environment.
What did you do?
Possible Reason:
If sfu1 relay sfu2 , it use ORTC API. When share screen stopped, it will cause rtpsender(sfu1) stop, but rtpreceiver(sfu2) do not kown that rtpsender(sfu1) has been stopped. So rtpreceiver(sfu2) will keep the dead track.