Closed nethertek closed 9 years ago
JsSIP does close the peerconnection. Sure. I will comment more on two days.
Thank you. We initially tried to implement our PoC according to the latest docs and after not being able to resolve this issue, tried to derive from the TryIt demo, but the problem was also present there. We would not have reported the issue otherwise.
Were you able to reproduce the problem?
In Tryit, when the session ends JsSIP calls close()
on the RTCSession
instance, which internally does:
[Log] JsSIP:RTCSession close() +2ms
[Log] rtcninja:RTCPeerConnection close() +2ms
[Log] JsSIP:RTCSession close() | closing local MediaStream +3ms
[Log] rtcninja:Adapter closeMediaStream() | calling stop() on the MediaStream +4ms
So the peerconnection is clearly closed along with the MediaStream.
Said that, in order to the webcam light to turn off the local MediaStream must be closed, which is what JsSIP does.
This must be a bug in the plugin, not in JsSIP, not even in the tryit demo.
Indeed the light remains on after the local MediaStream and the PeerConnection is closed in the Tryit demo. I insist: this MUST be a bug in the plugin.
Said that, you may try the following:
JsSIP.rtcninja.getUserMedia()
and pass the retrieved MediaStream to ua.call(target, {mediaStream:HERE})
.stop()
on your local MediaStream and let's know what happens.I will try to implement the suggested approach and update this issue accordingly. However, I would like to highlight that running the Munge SDP demo from Temasys that I referenced above, the camera does properly turn off the light and close.
In my own code using JsSIP and the plugin the issue does not happen. Not sure why (note: I follow the approach suggested in my previous mail).
So I want to be clear: there is nothing to fix in JsSIP regardless the camera is turned off in the Munge SDP demo.
We've successfully tested with the method you've described. Perhaps the docs could be updated to reflect this approach?
This issue can be closed, thank you.
We cannot update the JsSIP doc just because the Temasys plugin has a bug. The usage of JsSIP regarding the media stream is correct.
More info about this issue in the Temasys plugin:
https://groups.google.com/d/msg/temasys-discuss-webrtcplugin/w1kkdJPo3Y0/KMOs3khfAAAJ
Please investigate or point in the right direction without prematurely closing this issue.
References:
https://plugin.temasys.com.sg/demo/samples/web/content/peerconnection/munge-sdp/index.html https://groups.google.com/forum/#!topic/temasys-discuss-webrtcplugin/w1kkdJPo3Y0