multiple webRTC replaceTrack() calls for swapping two video streams

298 Views Asked by At

I'm making a video call application with two video sources: camera / screen record, and let the users switch camera <-> screen record multiple times during a call. RTCRtpSender.replaceTrack() allows me to replace the camera stream with the screen record stream.

But if I try to switch back to the camera stream, it doesn't work on ios. On android, I found this document. It seems that replaceTrack() will auto-dispose the track when it's no longer needed. If I use setTrack(_, takeOwnership=false), and it works ok.

I wonder if I can do the same on ios.

I'm developing a flutter application & using this library, but I wonder if this is even possible on ios native.

0

There are 0 best solutions below