dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.12k stars 1.73k forks source link

WebRTC + MAUI #3394

Closed mcblacksea closed 2 years ago

mcblacksea commented 2 years ago

Summary

MAUI AND WebRTC INTEROPERABILITY

REQUEST. WebRTC NuGet package for MAUI (or embedded into MAUI dll)

Request to have a NuGet package / or embedded dll (to use this through the namespace), to work with WebRTC from MAUI / Xamarin mobile app.

Intended Use Case

Would be great to have an opportunity to work with WebRTC right from MAUI / Xamarin mobile app. This option allows many developers build connections with WebRTC in order to provide users the video, audio calls, chats etc.

__ Thanks

AmSmart commented 2 years ago

Isn't this already possible? There are native bindings for Google's WebRTC libraries for Android and iOS. With MAUI Blazor, you can also achieve this fairly easily with JS interop.

mcblacksea commented 2 years ago

@AmSmart , please read carefully this issue description. This is not about numerous of workarounds about "How to" use WebRTC through the JS calls inside the Xamarin / MAUI mobile app, and this is also not about calls of the native apps code written either on Java (for Android) or on Objective-C (iOS) from the C# mobile app code (Xamarin / MAUI). But this issue is about creation appropriate NuGet package (or embedded functionality) into Xamarin / MAUI mobile solutions in order to allow developers work with such stuff like WebRTC and also ACS (which is using the WebRTC under the hood) right from the box, means right from cross platform mobile app (Xamarin / MAUI) With no additional workarounds in order to figure out how to call this Java method or that Objective-C, or JS one. And since people have a bunch of issues and questions related to this, so that's why this issue was created.

Also, please note that this issue is about mobile apps, not web apps like Blazor.

Thanks.

AmSmart commented 2 years ago

I see... this is a request for an OOTB WebRTC implementation. It is definitely a great addition, might not be worth the effort at the moment though🤷🏽‍♂️. I'll leave it to those who know better than myself to weigh in on the issue.

DLamb-MagicLeap commented 2 years ago

Perhaps something similar to WinRTC?

Eagle3386 commented 2 years ago

@VisualByteStudios WinRTC is obviously dead (see microsoft/winrtc#134 & neither any commit since April 2021 nor actual roadmap - "Coming soon" is the latest info on that).

So, what alternatives do we have to implement WebRTC in a MAUI app?

mcblacksea commented 2 years ago

@Eagle3386 as an attempt I created this issue: https://github.com/dotnet/maui/issues/3393 which was closed by @jfversluis without any reasons and progress from MS side on this issue. Also, in addition, I created this post: https://feedback.azure.com/d365community/idea/4c3c83f6-8948-ec11-a819-0022484bf651 You can take a look what's going on there. This is all about ACS (Azure Communication Services + .NET MAUI). By mine information ACS is using the WebRTC under the hood.

jfversluis commented 2 years ago

I'm sorry if the reason wasn't clear to you. In my opinion this is what is going on: yes, this would be amazing to have. In fact, I'd love to have this. However, we (.NET MAUI) are "just" a UI framework. We can't do everything ourselves and we shouldn't. I feel that features like these are too far outside of the scope of what we are doing with this framework.

WebRTC (and also the related Azure services you are talking about) add a lot of complexity. And most of the functionality isn't even visible. .NET MAUI as it is, is complex enough and we already have enough work on our plate with the features that I think are much more in scope.

I feel that functionality like this is perfect for a third-party library and ideally something that is provided by the team that is actually working on the services like WebRTC or in our case the Azure services related to that.

In light of all this, I am actually also going to close this one for now. Even if this were something that we would eventually incorporate in our framework directly, which I doubt, it won't be in the foreseeable future. Thanks!

sipsorcery commented 2 years ago

It's sad to see the winrtc project die before it even got to v0.1. I thought WebRTC, and realtime comms in general, might finally get some love from Microsoft now that there's a potential direct revenue angle with Azure Communication Services. Not to be I guess. Maybe in another couple of decades :).

For other readers the two projects I know of are:

mcblacksea commented 2 years ago

True, this is really sad. Since mobile phones were created in order to let people communicate with each other, and all of a sudden Xamarin and latest MAUI frameworks don't contain communication options for video/voice calls directly from own applications. This is definitely odd, softly speaking.