Which library to use

Hello,
I would like to create a hybrid mobile application that uses mediasoup and wondering which library to use for best results.

My requirement is to develop the app to work for IOS and Android. I am familiar with javascript and Angular framework and would like to use something around that in my client libraries instead of using native IOS/Android SDKs as i am not familair with Java / SWIFT.

MY question is, should i go with the mediasoup-clent javascript library or use the javascript-react native client if i want to use angular to develop the app?

Is it better to learn the react-native framework? Does the react-native mediasoup library provide any added value (performance etc) over the plain mediasoup plain javascript library when it comes to developing IOS/Android app?

Thank you

I’ve been using React Native with the Javascript mediasoup-client and the react-native-webrtc bindings and I’ve been very happy with it.

There’s no such thing as a react-native mediasoup library (That I’m aware of). There is only the Javascript mediasoup-client which depends on the WebRTC API. On the web, this is provided by the browser. In React-Native, this is provided by the react-native-webrtc module.

You’re talking about using Angular. I presume this means you’re going to use Nativescript? If so maybe this is a good place to start: https://github.com/triniwiz/nativescript-webrtc

1 Like

Thanks for your reply.
I am using Typescript with Angular mainly.
My concern is can I import mediasoup into my angular project and use something like
import * as mediasoupClient from ‘mediasoup-client’;
and then use the navigator like navigator.mediaDevices.getUserMedia({ video: { width: 200, height: 150 } }); and .produce inside a mobile application like IOS/Android ? Will it know how to map to the internal function calls that read from the cellphone camera/mic etc? Or do I need that webrtc binding you are talking about to run it on mobile devices?

ideally I would like to use the navigator to serve mobile apps and web apps
Not sure if I make sense

I don’t understand. Can you better describe the environment that you’re using? Are you building a native app that runs Javascript (like react-native or nativescript) Or a normal web app that’s designed to run on mobile?

Ok I still didnt decide which way to go. Either I use native script using angular/typescript or I develop a web app that in turn runs in a web view using angulara/typescript. I am not sure if there is a difference in performance. Idea is I would like to choose the best stack to start developing for both IOs and Android using mediasoup. I am a backend developer and new to the front end world.

Do you recommend any tech stack to use to develop in javascript for both android/iOS? I am familiar with angular and prefer using it over learning new frameworks like react

All I can say is that react-native with mediasoup has been a breeze. I would highly recommend it.

I think getting Angular to work is going to be an uphill battle. That nativescript-webrtc project I linked to before doesn’t seem nearly as maintained as react-native-webrtc.

You could try running Angular inside a WebView, but you will be dependent on the WebView’s WebRTC implementation. I maybe be wrong, but I don’t think iOS provides this through a WebView. Or if it does, it’s somewhat limited. You might want to investigate more.

If you really want to use Angular, you could consider building most of the app in Javascript, and writing native code (Java/ObjC) for the WebRTC stuff. The native code would need to use libmediasoupclient, which has bindings available for Objective C and Java.