Skip to content
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

Implement PeerHandler.stop() #38

Closed
stefanalund opened this issue Oct 9, 2014 · 7 comments
Closed

Implement PeerHandler.stop() #38

stefanalund opened this issue Oct 9, 2014 · 7 comments

Comments

@stefanalund
Copy link
Contributor

The following is logged e.g. on page reloads: PeerHandler.stop() called (not implemented)

@sdroege
Copy link
Contributor

sdroege commented Nov 5, 2014

The ground work for this should be done with https://github.com/sdroege/openwebrtc/tree/pipeline-refactoring

Not sure if something else is still missing other than implementing PeerHandler.stop() in the JS layer.

@superdump
Copy link
Contributor

There we need to set_*source NULL on the media sessions and renderers and then unref the renderers and transport agent. I think that should be all.

@sdroege
Copy link
Contributor

sdroege commented Nov 6, 2014

The problem is that JS (and other GC'd languages) don't give you a way to "unref" something. Which might be an argument for adding some kind of "stop" function to the renderers and transport agents to let them release all their resources immediately. Could be called "dispose" like in Java, C# and others, I don't know what JS people usually do there. And after calling that, every other action on the object is invalid.

@stefhak
Copy link
Contributor

stefhak commented Nov 19, 2014

Relevant JS methods:
MediaStreamTrack.stop();
RTCPeerConnection.close();
RTCDataChannel.close(); //once someone implements support for data channels

Note that the objects are still around (and the app is able to read out statistics for example) after stopping/closing, but they can't be used for anything meaningful.

@sdroege
Copy link
Contributor

sdroege commented Dec 23, 2014

This is being worked on here: https://github.com/pererikb/openwebrtc/commits/js_shutdown

@sdroege
Copy link
Contributor

sdroege commented Dec 23, 2014

@pererikb , is that ready to be merged?

@pererikb
Copy link
Contributor

Yes

adam-be pushed a commit to adam-be/openwebrtc that referenced this issue Apr 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants