Android app crashes on creating second peerconnection after the first peerconnection closed

19 views
Skip to first unread message

Phil

unread,
Dec 9, 2019, 5:39:03 AM12/9/19
to discuss-webrtc
Hi,

I'm developing audio video calling app. I'm using using renegotiation for switching audio to video call. Now call working with audio and video. If the peerconnection went to disconnected state I'm using the following process.
I'm disposing the peerconnection after 2 sec of ice-disconnected  state. After the i'm creating a new peerconnection then adding the same media stream.
I'm getting the following error when creating the mediastream second time with different streamid

PID: 17677
   java.lang.IllegalStateException: MediaStreamTrack has been disposed.
        at org.webrtc.MediaStreamTrack.checkMediaStreamTrackExists(MediaStreamTrack.java:120)
        at org.webrtc.MediaStreamTrack.getNativeMediaStreamTrack(MediaStreamTrack.java:114)
        at org.webrtc.AudioTrack.getNativeAudioTrack(AudioTrack.java:28)
        at org.webrtc.MediaStream.addTrack(MediaStream.java:33)

check this. 

Thanks in advance

Regards,
Phil.
Reply all
Reply to author
Forward
0 new messages