-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MediaStream remote close by using an aux RTCDataChannel #963
Conversation
Sorry for getting to this so late. |
@jonasgloning Thanks! Just did some quick testing with the |
Hi, I can confirm that 1.4.6-rc.2 build works for me too. Thanks for the work! |
When is this going live? |
@matallui hello, can I help you somehow to go this to production? really need this fix |
@asurovenko-zeta Release 1.4.8-rc1 seems to include a fix for this. I haven't really tested it, but give it a try. If that works I think we can drop this PR. |
I can confirm this to work, but it is not the proper way to solve this IMHO. It does not merge into current master w/o conflicts, but I merged it manually. As said, it works, but it is a hack. IMHO the proper solution would be to send a new OFFER on publisher's close, not containing the video channel and accepting the answer. This then should lead to a close event on subscriber side. Anyway it works. But that this bug is open since so long is quite embarrassing for the maintainer(s) and not a good sign of reliability. |
@neilyoung take a look at release 1.4.8-rc.1. They seem to have added a fix for this (different than the changes from this PR). Like I said, I opened this PR because I needed a fix and this was the way I got it working, but I assumed there would be better fixes. If the fixes from RC don't work, you can always open a PR if you have some thoughts on how to fix this. |
Disregard please. Typo in version |
Yes it works. And they have adopted your solution. It remains a hack (no offence) |
@neilyoung they have? I thought they did something much simpler ec1d5ae Am I missing something? |
Hmm. Now I'm not sure anymore. Let me checkout master again and then the RC. I had applied your patch manually... I stashed it and checked out the RC... Later checked the sources and found your changes... |
That parcel build is strange. Look at this. Error in run 1, ok in run 2:
|
Hasn't this been one of your changes? To negoiator.ts? It is in now.
|
oh, maybe they just made changes on top of my changes... did't realize that. I agree, I don't think this is the solution, I just didn't know any better. If you have an idea on how to fix this in a better way, go for it. It'll be much appreciated. |
I'm not sure if it is worth the efforts. This project seems to be pretty dead. And it doesn't support iterative addition/removal of streams, like lets start with data, then audio and later video and lets switch happily all these things on and off (like mediasoup). I tend to write my own client. |
BTW: You did fine. You solved the problem. That's ok. |
4f58de5
to
0d5fcfd
Compare
0d5fcfd
to
21e98a2
Compare
🎉 This PR is included in version 1.5.0-rc.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Problem
MediaConnection.close()
doesn't propagate theclose
event to the remote peer.Solution
The proposed solution uses a similar approach to the
DataConnection
, where an aux data channel is created for the connection.This way, when we
MediaConnection.close()
the data channel will be closed and theclose
signal will be propagated to the remote peer.Notes
I was not sure if there was another cleaner way of achieving this, without the extra data channel, but this seems to work pretty well (at least until a better solution comes up).
This should fix: #636