Is the Nx Cloud up? Visit our Status Page for the current health and performance of the Nx Cloud.

Status Page

WebRtc audio with webrtc-stream-manager v2

Answered

Comments

1 comment

  • Ichiro
    • Network Optix team

    Hi 
     

    Thanks for your question. Two separate things here.

    At the SDP level it isn't a library choice. The library is the answerer, not the offerer. The Nx server sends the offer and peer-connection.js  does setRemoteDescription then createAnswer. Under unified-plan, audio and video are separate m-lines, so ontrack fires once per track. Any WebRTC receiver gets two tracks by-design.

    At the library level the split is deliberate and video-only. CameraConnection ignores the server's stream grouping and builds its own managedStream, then emits streams: [this.managedStream] instead of event.streams. 

    Reason: it keeps two live peer connections (low-res base, high-res upgrade) and swaps the video track in place so srcObject identity never changes and you don't get a black flash on quality switches. That swap is inherently per-track. The MSE path forces it too, since video there comes from MseRenderer's captureStream(), not from the RTP track.

    If you need the audio track, PeerConnectionWrapper re-emits event.streams untouched one layer down. 

     

    So, in fact, you have done the proper implementation. 
    Thanks for your questions and understanding.

     

    0

Please sign in to leave a comment.