iOS / Swift wrapper for Mediasoup client

Hi!

We build a communication platform (server + Web / iOS / Android client apps) based on Mediasoup. While application itself is proprietary, we’ve been using open-source solutions extensively. Regarding iOS client, our first versions were built around @ethand91’s libmediasoupclient wrapper. Although there were some issues, it was a good starting point. We’ve managed to fix several bugs that seemed most critical for our application and added couple of features we’ve missed:

  • fixed some crashes
  • fixed some memory leaks
  • added codec factories management
  • added TURN servers support

So we’ve lived inside a fork for some time. But С++ / Objective-C nature of this solution never looked good in a pure Swift project. Not only because of the API style, which could be solved by hiding all the Objective-C into one more layer of abstraction with Swift protocols and enums. There were inherent problems that could be solved only by complete redesign of the C++ to Objective-C bridge itself. First of all, C++ code can throw and all exceptions should be propagated up to the Swift code and never cause the app to crash.

Finally we’ve decided to rewrite all the wrappers (C++ to Objective-C and Objective-C to Swift) from scratch and publish them, so here is our Mediasoup-Client-Swift wrapper. General idea was to make libmediasoupclient look native in Swift project and as safe as possible (in terms of crashes, exceptions handling and type-safety).

This solutions already runs in our production app and we would like to see more apps using it!

4 Likes

Sorry for the super late response. Libs added in the website: mediasoup :: GitHub

Thanks.