jitsi / lib-jitsi-meet

A low-level JS video API that allows adding a completely custom video experience to web apps.
Apache License 2.0
1.33k stars 1.11k forks source link

Add iOSRTC Cordova Plugin Support #595

Open DrJacobHolden opened 6 years ago

DrJacobHolden commented 6 years ago

I have been fiddling for the last week trying to get this plugin to work with Lib-Jitsi-Meet. By tricking lib-jitsi-meet into thinking it is always the React Native variant I have had success joining the conference and sending my local video and audio. I can also receive the audio of other conference participants. I cannot however get the video of other participants to appear on the iPhone.

I have attempted to write a custom implementation in the RTC module for isiOSCordova (or the like) but due to a lack of low level understanding of the protocols involved I can do little more than look at what has been done to make other browsers/platforms work and see if doing the same for iOSRTC helps or makes it worse.

It is trivial to detect when a user is running Cordova as you can check for window.cordova and if this passes you can look at what plugins are available and their versions as well as platform specific information. The biggest hurdle to developing this is that iOS development requires all Apple technology and in order to test iOSRTC you need a physical Apple device (iPhone 5S or newer) as the simulator provided on all Apple machines cannot be granted camera/microphone access. As a result - the build chain is quite lengthy and time consuming (not to mention frustrating).

My workplace has indicated that they would be willing to sponsor this work if required.

roeycohen commented 6 years ago

hi, hope this will help someone and he will create a pull request. from the tests i did, two changes are required for iOSRTC to work:

  1. in modules/RTC/RTCBrowserType.js - change the detectChrome function to return true for ios.
  2. fix a race condition in modules/RTC/TraceablePeerConnection.js - _remoteTrackAdded: unnamed 1

Roey

DaveLomber commented 5 years ago

I made it works with iOS RTC Cordova plugin

One issue that I have - when there is an active call, and we go to background/foreground, then something happens with a remote audio track - it stopped playing remote audio. If anyone have any ideas - please share

narenpublic commented 4 years ago

@DaveLomber are you still tinkering with this. I am looking for a way to build an Ionic angular app with a cordova plugin that ideally can make use of lib-jitsi-meet so I can have my own ionic gui to conferences.

DaveLomber commented 4 years ago

@narenpublic the issue is resolved at my side, I can share some customs if required let me know

narenpublic commented 4 years ago

@DaveLomber any kind of blueprint for getting an ios cordova app up and running with access to lib-jitsi-meet that uses the native calls under the hood would be amazing!

roeycohen commented 4 years ago

@DaveLomber would be nice if you post you workarounds here :)

DaveLomber commented 4 years ago

Here is a patch attached

just couple of notes:

jitsi-cordova-apr23.patch.zip

It's not ideal from my perspective, as I see some strange things in it (you can read the comments inside), but it works

sapkra commented 3 years ago

@DaveLomber Would it be possible for you to create a PR since there is some interest?