Igor-Khomich / JanusAudioStreamPlayer

14 stars 4 forks source link

VideoRoom example is missing something. #7

Closed gonzag closed 3 years ago

gonzag commented 3 years ago

Hi, thanks for the VideoRoom example, it's very helpful but I think is missing something. In the current state, you can publish the video but you can't subscribe at the same time. As a result on the iOS app, I only see my local video feed but not the remote one. (In the remote end I can see the video from the iOS app)

Reading the documentation it seems you need to create a new handle for each element. So one handle to subscribe and one handle to publish.

But I'm lost there, should I also need to create a new PeerConnection for each element? Because if I try to use the same PeerConnection I get an error like this:

Error Domain=org.webrtc.RTC_OBJC_TYPE(RTCPeerConnection) Code=-1 
"Failed to set remote answer sdp: Failed to apply the description for m= section with mid='audio': Failed to set SSL role for the transport.

Any advice will be appreciated, Thanks.

gonzag commented 3 years ago

Yes, it was that. You need a handle and a PeerConnection for each element you connect.

Igor-Khomich commented 3 years ago

Hi, @gonzag just saw your message

You need a handle and a PeerConnection for each element you connect. yes, that's right, at least official janus demo works in that way