WebRTC change Track while streaming

Hi everyone,

I’m currently implementing a streaing application with WebRTC and WSE 4.8.5. where you can user your webcam or share your screen into the world.

I have two questios:

  1. While on air, I want for the presenter to change from webcam to screensharing and vice versa. I know I can just call replaceTrack on my PeerConnection to swap them out. But I would like to do it in a clean way, because I read on webrtchacks.com that there could be promlems i.e. when changing the resolution. Now I can’t find I way to use the onnegotiationneeded emitter, because wowza tells my that my stream name is already in use. Is there way to get this working or should I just stay with the replacement?

  2. Can I use more than 3 track per connection?
    I want screensharing with

  • the videotrack
  • the audiotrack from the selected screen
  • an audio track from a microphone.
    The user Remy posted in slack that wowza only allows two tracks per PeerConnection (April 2020). I didn’t get it working till now, the second audio is omitted. Is there a way to send 3 tracks, or do I have to establish another connection?

Kind regards,
Andi

Sorry @Andreas_Specker, but that is not possible to do at this time through Wowza. Your only option would be hire a WebRTC consultant or Pro Services to have some custom work done and even then I’m not sure how well that would work within the our current WebRTC model.

Thanks for the reply!
At least I am certain now that the problem is not me :slight_smile: and I can work around somehow.