findmate / cordova-plugin-jitsi-meet

Cordova plugin for jitsi meet react native sdk
17 stars 21 forks source link

How can I know that a video call is ended ? #22

Open varaprasadreddy9676 opened 3 years ago

varaprasadreddy9676 commented 3 years ago

In my ionic 5 app, after the video call ended I want to navigate to a particular page. How can I know that the video call status. I'm using like this jitsiplugin.loadURL(url, roomId, false, function (data) { if (data === 'CONFERENCE_WILL_LEAVE') { jitsiplugin.destroy(function (data) { // call finished this.router.navigate(['appointment-list']); }, function (err) { console.log(err); }); } }, function (err) { console.log(err); });

But here the control not even coming to jitsiplugin.destroy() How can I solve this

viking2917 commented 3 years ago

I have the same issue, just discovered a few minutes ago. The callback gets called on iOS and I can realize the meeting is closed, but for some reason on Android the callback never fires. It's possible I have done something wrong, but the same code works on iOS

jitsiplugin.loadURL(domain + roomName, roomName, false, function (data) {

// never get to this line on Android. iOS does...
                if (data === "CONFERENCE_WILL_LEAVE") {

                    jitsiplugin.destroy(function (/* data */) { // call finished
                    $rootScope.$broadcast('meeting.close', {});
                    }, function (err) {
                    $rootScope.$broadcast('meeting.close', {});
                    console.log(err);
                    });
                }
            }, function (err) {
                console.log(err);
            });
viking2917 commented 3 years ago

Ug. It looks like on Android all the Listeners are commented out!

https://github.com/findmate/cordova-plugin-jitsi-meet/blob/master/src/android/JitsiPlugin.java

//       @Override
//       public void onConferenceWillLeave(Map<String, Object> data) {
//         on("CONFERENCE_WILL_LEAVE", data);

I do not know why that would be??

@slothstronaut, it looks like your commit of Feb 20, 2020 (00df7c5b2165b4561fc26833c7d012a30ed93dd2) commented all the listeners out, do you by chance recall why that was, or was it accidental?

slothentic commented 3 years ago

@viking2917 Sorry, no clue. I'm not much help on the native code. I was just trying to merge in two different repos to get something that would build and work on both platforms. I can't comment on that decision as it was made in a different repo.

viking2917 commented 3 years ago

@slothstronaut thanks for the quick reply. Interestingly, if you do an 'ionic cordova plugin add cordova-plugin-jitsi-meet', it doesn't install the latest (with the commented out code), it installs 0.4.2 which does have the listeners working. A bit puzzling. thanks for getting back to us.

varaprasadreddy9676 commented 3 years ago

Ug. It looks like on Android all the Listeners are commented out!

https://github.com/findmate/cordova-plugin-jitsi-meet/blob/master/src/android/JitsiPlugin.java

//       @Override
//       public void onConferenceWillLeave(Map<String, Object> data) {
//         on("CONFERENCE_WILL_LEAVE", data);

I do not know why that would be??

@slothstronaut, it looks like your commit of Feb 20, 2020 (00df7c5b2165b4561fc26833c7d012a30ed93dd2) commented all the listeners out, do you by chance recall why that was, or was it accidental?

Hi @viking2917 , How can I get this work in android.? Will it work if I uncomment these lines.

viking2917 commented 3 years ago

I am not sure yet I am having the same issue. If I figure something out I will post back. As I mentioned the lines are commented out in the latest, but ionic/npm don't seem to install the latest, they install 0.4.2 which does not have the lines commented out....puzzled at the moment.

On Sat, Feb 6, 2021, 10:17 AM SaiVaraprasad notifications@github.com wrote:

Ug. It looks like on Android all the Listeners are commented out!

https://github.com/findmate/cordova-plugin-jitsi-meet/blob/master/src/android/JitsiPlugin.java

// @Override // public void onConferenceWillLeave(Map<String, Object> data) { // on("CONFERENCE_WILL_LEAVE", data);

I do not know why that would be??

@slothstronaut https://github.com/slothstronaut, it looks like your commit of Feb 20, 2020 (00df7c5 https://github.com/findmate/cordova-plugin-jitsi-meet/commit/00df7c5b2165b4561fc26833c7d012a30ed93dd2) commented all the listeners out, do you by chance recall why that was, or was it accidental?

Hi @viking2917 https://github.com/viking2917 , How can I get this work in android.? Will it work if I uncomment these lines.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/findmate/cordova-plugin-jitsi-meet/issues/22#issuecomment-774492572, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2VYVIJVTYYWPNAW2WV4WLS5VMSLANCNFSM4XEBBQZQ .

varaprasadreddy9676 commented 3 years ago

Thank you so much

varaprasadreddy9676 commented 3 years ago

I am not sure yet I am having the same issue. If I figure something out I will post back. As I mentioned the lines are commented out in the latest, but ionic/npm don't seem to install the latest, they install 0.4.2 which does not have the lines commented out....puzzled at the moment. On Sat, Feb 6, 2021, 10:17 AM SaiVaraprasad @.***> wrote: Ug. It looks like on Android all the Listeners are commented out! https://github.com/findmate/cordova-plugin-jitsi-meet/blob/master/src/android/JitsiPlugin.java // @override // public void onConferenceWillLeave(Map<String, Object> data) { // on("CONFERENCE_WILL_LEAVE", data); I do not know why that would be?? @slothstronaut https://github.com/slothstronaut, it looks like your commit of Feb 20, 2020 (00df7c5 <00df7c5>) commented all the listeners out, do you by chance recall why that was, or was it accidental? Hi @viking2917 https://github.com/viking2917 , How can I get this work in android.? Will it work if I uncomment these lines. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#22 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2VYVIJVTYYWPNAW2WV4WLS5VMSLANCNFSM4XEBBQZQ .

Hi @viking2917 , do you have any idea on increasing the video quality of this current plugin?. Please let me know if you have any idea or any plugin like this.

viking2917 commented 3 years ago

@varaprasadreddy9676 I don't sorry. The documentation might have suggestions. To be honest I find the video quality of this is better than what I get with Zoom. It's mostly a bandwidth issue - if you are on a slow connection you might get worse video. But I don't know any way to change it explicitly.

varaprasadreddy9676 commented 3 years ago

@varaprasadreddy9676 I don't sorry. The documentation might have suggestions. To be honest I find the video quality of this is better than what I get with Zoom. It's mostly a bandwidth issue - if you are on a slow connection you might get worse video. But I don't know any way to change it explicitly.

@viking2917 thanks for the reply. Actually jitsi updated the sdk. But this plug-in is not updated. Also if u got any thing in the previous issue I.e., about on meeting end please let me know.

viking2917 commented 3 years ago

@varaprasadreddy9676 still investigating. Yes, I think the api has changed somehow, just uncommenting the code doesn't work. I am looking at other forks of this plugin to see if one is working. Will post if I find something satisfactory.

varaprasadreddy9676 commented 3 years ago

@varaprasadreddy9676 still investigating. Yes, I think the api has changed somehow, just uncommenting the code doesn't work. I am looking at other forks of this plugin to see if one is working. Will post if I find something satisfactory.

Thanks a lot.

viking2917 commented 3 years ago

On a first try, this fork seems to work on Android in my environment: https://github.com/YPT-ME/cordova-plugin-jitsi. It generates a CONFERENCE_TERMINATED event when you leave a conference. I haven't tried it on iOS yet, but this plugin seems to work fine on iOS. But I am just hacking on all this stuff I am not a Java/Native person, so definitely do your own confirming if it works for you. Good luck!

varaprasadreddy9676 commented 3 years ago

On a first try, this fork seems to work on Android in my environment: https://github.com/YPT-ME/cordova-plugin-jitsi. It generates a CONFERENCE_TERMINATED event when you leave a conference. I haven't tried it on iOS yet, but this plugin seems to work fine on iOS. But I am just hacking on all this stuff I am not a Java/Native person, so definitely do your own confirming if it works for you. Good luck!

If i'm using this plugin , My app is getting stopped. Are you facing this issue ?

viking2917 commented 3 years ago

@varaprasadreddy9676 the YPT-ME version is working for me. Haven't finished testing everything, but it's basically working. Is your app getting stopped when you start the video, or just when you start the app? If you are doing this on Android, try running 'adb logcat' in another window while you run the app so you can see the error. Also, per the YPT Readme, make sure your Android Manifest has the activity in it, or add this to your config.xml:

<config-file target="AndroidManifest.xml" parent="/manifest/application">
    <activity
        android:name="com.cordova.plugin.jitsi.JitsiMeetPluginActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
        android:launchMode="singleTask"
        android:resizeableActivity="true"
        android:supportsPictureInPicture="true"
        android:windowSoftInputMode="adjustResize">
    </activity>
</config-file>
varaprasadreddy9676 commented 3 years ago

@varaprasadreddy9676 the YPT-ME version is working for me. Haven't finished testing everything, but it's basically working. Is your app getting stopped when you start the video, or just when you start the app? If you are doing this on Android, try running 'adb logcat' in another window while you run the app so you can see the error. Also, per the YPT Readme, make sure your Android Manifest has the activity in it, or add this to your config.xml:

<config-file target="AndroidManifest.xml" parent="/manifest/application">
    <activity
        android:name="com.cordova.plugin.jitsi.JitsiMeetPluginActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize"
        android:launchMode="singleTask"
        android:resizeableActivity="true"
        android:supportsPictureInPicture="true"
        android:windowSoftInputMode="adjustResize">
    </activity>
</config-file>

App is getting stopped when I start the video.

viking2917 commented 3 years ago

run 'adb logcat', see what the error is, and investigate from there. I saw that once when I had to config-file problem.

Zeno97 commented 3 years ago

Since the last commit in this repository was a year ago I've created my own jitsi meet sdk cordova plugin from scratch that supports Android. All options and feature flags from native SDK are available. Also are implemented listeners for events like onConferenceWillJoin, onConferenceJoined, onConferenceTerminated and as a plus i've added a support for native Android callback like onCreate, onDestroy, onBackPressed, onUserLeaveHint (when enters pip mode), etc... Give a look here https://github.com/Zeno97/cordova-plugin-jitsi-meet-sdk

viking2917 commented 3 years ago

@Zeno97 Thanks for that! I will check it out. I have been pretty successful on both ios and android, with https://github.com/YPT-ME/cordova-plugin-jitsi, although I forked it to https://github.com/viking2917/cordova-plugin-jitsi to change some of the initiation parameters. If you want a basic working iOS version for your repo, you could probably just grab the iOS portion of one of those...

Zeno97 commented 3 years ago

@viking2917 thanks mate, for sure when i will find a macbook to use i will follow your suggestion. I need a way to test before add this support. In this period i can give support only for android then iOS support will take some time...

varaprasadreddy9676 commented 3 years ago

@Zeno97 Thanks for that! I will check it out. I have been pretty successful on both ios and android, with https://github.com/YPT-ME/cordova-plugin-jitsi, although I forked it to https://github.com/viking2917/cordova-plugin-jitsi to change some of the initiation parameters. If you want a basic working iOS version for your repo, you could probably just grab the iOS portion of one of those...

@viking2917 , While adding this plugin, I'm getting like this. Any Idea why this happening

PS D:\medics-apps\medics-doc\medics-doc-app> cordova plugin add https://github.com/sumeetchhetri/cordova-plugin-jitsi Failed to fetch plugin https://github.com/sumeetchhetri/cordova-plugin-jitsi via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. CordovaError: Error: No git binary found in $PATH PS D:\medics-apps\medics-doc\medics-doc-app>

viking2917 commented 3 years ago

I haven't used that particular version of the plugin, but the error you are getting doesn't look plugin specific. couple of ideas:

  1. are you using ionic? If so, you need to do something like 'ionic cordova plugin add https://github.com/sumeetchhetri/cordova-plugin-jitsi'

  2. you might try creating a new, clean project and try to add the plugin. If that works, something is messed up in your existing project.

  3. the error: CordovaError: Error: No git binary found in $PATH PS D:\medics-apps\medics-doc\medics-doc-app> indicates some kind of problem in your git or project setup, I've never seen that error before.

Sorry can't be of more help. You might try some of the other plugins I mention in my comment, e.g.

'ionic cordova plugin add https://github.com/YPT-ME/cordova-plugin-jitsi'

and make sure your project is clean and has no references to other versions of this plugin.

-- Get my new social reading app: Bookship https://www.bookshipapp.com/ Shortlisted for The Bookseller's BookTech Company of the Year. https://www.thebookseller.com/futurebook/booktech-company-year-2017-final-6-657151 Because reading is better with friends.

https://www.linkedin.com/in/markwatkins1/

On Mon, Feb 22, 2021 at 5:49 AM SaiVaraprasad notifications@github.com wrote:

@Zeno97 https://github.com/Zeno97 Thanks for that! I will check it out. I have been pretty successful on both ios and android, with https://github.com/YPT-ME/cordova-plugin-jitsi, although I forked it to https://github.com/viking2917/cordova-plugin-jitsi to change some of the initiation parameters. If you want a basic working iOS version for your repo, you could probably just grab the iOS portion of one of those...

@viking2917 https://github.com/viking2917 , While adding this plugin, I'm getting like this. Any Idea why this happening

PS D:\medics-apps\medics-doc\medics-doc-app> cordova plugin add https://github.com/sumeetchhetri/cordova-plugin-jitsi Failed to fetch plugin https://github.com/sumeetchhetri/cordova-plugin-jitsi via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. CordovaError: Error: No git binary found in $PATH PS D:\medics-apps\medics-doc\medics-doc-app>

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/findmate/cordova-plugin-jitsi-meet/issues/22#issuecomment-783283308, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2VYVPJMKNLOZOZZZ33T2TTAIZETANCNFSM4XEBBQZQ .

varaprasadreddy9676 commented 3 years ago

I haven't used that particular version of the plugin, but the error you are getting doesn't look plugin specific. couple of ideas: 1. are you using ionic? If so, you need to do something like 'ionic cordova plugin add https://github.com/sumeetchhetri/cordova-plugin-jitsi' 2. you might try creating a new, clean project and try to add the plugin. If that works, something is messed up in your existing project. 3. the error: CordovaError: Error: No git binary found in $PATH PS D:\medics-apps\medics-doc\medics-doc-app> indicates some kind of problem in your git or project setup, I've never seen that error before. Sorry can't be of more help. You might try some of the other plugins I mention in my comment, e.g. 'ionic cordova plugin add https://github.com/YPT-ME/cordova-plugin-jitsi' and make sure your project is clean and has no references to other versions of this plugin. -- Get my new social reading app: Bookship https://www.bookshipapp.com/ Shortlisted for The Bookseller's BookTech Company of the Year. https://www.thebookseller.com/futurebook/booktech-company-year-2017-final-6-657151 Because reading is better with friends. https://www.linkedin.com/in/markwatkins1/ On Mon, Feb 22, 2021 at 5:49 AM SaiVaraprasad @.***> wrote: @Zeno97 https://github.com/Zeno97 Thanks for that! I will check it out. I have been pretty successful on both ios and android, with https://github.com/YPT-ME/cordova-plugin-jitsi, although I forked it to https://github.com/viking2917/cordova-plugin-jitsi to change some of the initiation parameters. If you want a basic working iOS version for your repo, you could probably just grab the iOS portion of one of those... @viking2917 https://github.com/viking2917 , While adding this plugin, I'm getting like this. Any Idea why this happening PS D:\medics-apps\medics-doc\medics-doc-app> cordova plugin add https://github.com/sumeetchhetri/cordova-plugin-jitsi Failed to fetch plugin https://github.com/sumeetchhetri/cordova-plugin-jitsi via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. CordovaError: Error: No git binary found in $PATH PS D:\medics-apps\medics-doc\medics-doc-app> — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#22 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2VYVPJMKNLOZOZZZ33T2TTAIZETANCNFSM4XEBBQZQ .

Thanks @viking2917 , Got the issue. I just degraded my node js version from 14 to 7 , Now it is working.

Zeno97 commented 3 years ago

Hello everyone, i've updated my plugin with the last sdk version that implements also listeners about participants. Please give me some feedback https://github.com/Zeno97/cordova-plugin-jitsi-meet-sdk/