Giter VIP home page Giter VIP logo

Comments (19)

jefaokpta avatar jefaokpta commented on June 14, 2024

Have you tested the pip on Android or IOS? If it's on Android, did you need to change something in the native code?

from capacitor-jitsi-meet.

msp-ampcome avatar msp-ampcome commented on June 14, 2024

It is on android. I have to change the AndroidManifest in the plugin to enable PIP. but once enabled, going in and out of PIP is very jarring experience. but it working on jitsi meet app and flutter plugin.

from capacitor-jitsi-meet.

jefaokpta avatar jefaokpta commented on June 14, 2024

It is on android. I have to change the AndroidManifest in the plugin to enable PIP. but once enabled, going in and out of PIP is very jarring experience. but it working on jitsi meet app and flutter plugin.

I had the same experience, on native code and in flutter works pretty well. Even with this issue I rather Ionic than others. It's more simple.

from capacitor-jitsi-meet.

calvinckho avatar calvinckho commented on June 14, 2024

I intentionally disabled PIP on the plugin for this reason. I will investigate again and see if there is any solution.

from capacitor-jitsi-meet.

calvinckho avatar calvinckho commented on June 14, 2024

@jefaokpta @msp-ampcome According to the Jitsi mobile SDK documentation:

Jitsi Meet SDK does not currently implement native Picture-in-Picture on iOS. If desired, apps need to implement non-native Picture-in-Picture themselves and resize JitsiMeetView.

I currently do not have time to work on this, but you are welcome to try and add non-native support for PIP in iOS and submit a PR.

As for PIP support on Android, I have done some work and seem to be able to get it to work. Try to install 2.1.2-beta.0 and deploy it on Android to test it.

from capacitor-jitsi-meet.

msp-ampcome avatar msp-ampcome commented on June 14, 2024

@calvinckho Hey thanks for the quick update, I installed the beta version and tested it. Now PIP mode is working properly, Audio/Video is working as expected. But If i disconnect the call, the app is crashing, regardless of whether i entered PIP mode or not. This is the error I am getting and attached the screen record for your reference
`
E/JitsiMeetSDK: JitsiMeetUncaughtExceptionHandler FATAL ERROR
java.lang.RuntimeException: Unable to stop activity {com.kr4all.doctorapp/com.capacitor.jitsi.plugin.JitsiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.jitsi.meet.sdk.JitsiMeetView.dispose()' on a null object reference
at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4956)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4927)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:5001)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:233)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2116)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:7904)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.jitsi.meet.sdk.JitsiMeetView.dispose()' on a null object reference
at com.capacitor.jitsi.plugin.JitsiActivity.onStop(JitsiActivity.java:162)
at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1477)
at android.app.Activity.performStop(Activity.java:8358)
at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4948)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4927)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:5001)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:233)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2116)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:7904)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)

java.lang.RuntimeException: Unable to stop activity {com.kr4all.doctorapp/com.capacitor.jitsi.plugin.JitsiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.jitsi.meet.sdk.JitsiMeetView.dispose()' on a null object reference
    at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4956)
    at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4927)
    at android.app.ActivityThread.handleStopActivity(ActivityThread.java:5001)
    at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:233)
    at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
    at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2116)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:236)
    at android.app.ActivityThread.main(ActivityThread.java:7904)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
 Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.jitsi.meet.sdk.JitsiMeetView.dispose()' on a null object reference
    at com.capacitor.jitsi.plugin.JitsiActivity.onStop(JitsiActivity.java:162)
    at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1477)
    at android.app.Activity.performStop(Activity.java:8358)
    at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4948)
    at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4927) 
    at android.app.ActivityThread.handleStopActivity(ActivityThread.java:5001) 
    at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:233) 
    at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) 
    at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) 
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2116) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loop(Looper.java:236) 
    at android.app.ActivityThread.main(ActivityThread.java:7904) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967) 

I/JitsiMeetSDK: [features/base/connection] No connection found while disconnecting.
[FeatureFlags] Source name signaling: false
D/JitsiMeetSDK: [modules/connectivity/NetworkInfo.js] updateNetworkInfo { isOnline: true }
I/JitsiMeetSDK: [features/analytics] Initialized 1 analytics handlers
I/JitsiMeetSDK: [features/base/media] Start muted:
D/JitsiMeetSDK: ExternalAPI Sending event: VIDEO_MUTED_CHANGED with data: { NativeMap: {"muted":0} }
I/JitsiMeetSDK: [features/base/media] Start audio only set to false`

https://drive.google.com/file/d/1rS0z_SlgpPvXN4NHHrNa_DVvn6Pm5OCQ/view?usp=sharing

from capacitor-jitsi-meet.

calvinckho avatar calvinckho commented on June 14, 2024

can you try 2.1.2-beta.1? I fixed a bug which caused the crash.

from capacitor-jitsi-meet.

msp-ampcome avatar msp-ampcome commented on June 14, 2024

Will try and let you know

from capacitor-jitsi-meet.

msp-ampcome avatar msp-ampcome commented on June 14, 2024

@calvinckho Yeah, now the crash is fixed. Thank you so much. We really appreciate your quick response and your hard work. I tested it on Android 11. We will test it on more devices and let you know the results.

from capacitor-jitsi-meet.

msp-ampcome avatar msp-ampcome commented on June 14, 2024

@calvinckho sometimes the status bar is showing up on PIP mode. like this https://ibb.co/GCK0ss8

from capacitor-jitsi-meet.

calvinckho avatar calvinckho commented on June 14, 2024

@msp-ampcome yes I also noticed it on my test app PIP window. The header bar would stay for a few seconds and then disappear. Have you noticed the same UI behavior in the official Jitsi app?

from capacitor-jitsi-meet.

msp-ampcome avatar msp-ampcome commented on June 14, 2024

@calvinckho In the official app, the header bar is not showing. Maybe we have to remove the title bar ourselves like shown here.
https://stackoverflow.com/questions/36236181/how-to-remove-title-bar-from-the-android-activity/36236222

from capacitor-jitsi-meet.

calvinckho avatar calvinckho commented on June 14, 2024

@msp-ampcome Thanks for your research. It was helpful. I disabled the header bar in the plugin's AndroidMannifest.xml file. Please try 2.1.2-beta.2 in your test app.

from capacitor-jitsi-meet.

msp-ampcome avatar msp-ampcome commented on June 14, 2024

@calvinckho Thanks for the update, We tested it, now the header bar is not coming. But we found an another bug. if the user closed the PIP window with the close button. the call is not disconnected on jitsi. if you rejoin the call. you can see 3 participants. You can see your name twice. one is current session, another one is the previous dead version. This issue is not coming, if we disconnect from the meeting properly via the reject call button on the expanded jitsi view.

from capacitor-jitsi-meet.

calvinckho avatar calvinckho commented on June 14, 2024

Ok let me check on this issue.

from capacitor-jitsi-meet.

calvinckho avatar calvinckho commented on June 14, 2024

@calvinckho Thanks for the update, We tested it, now the header bar is not coming. But we found an another bug. if the user closed the PIP window with the close button. the call is not disconnected on jitsi. if you rejoin the call. you can see 3 participants. You can see your name twice. one is current session, another one is the previous dead version. This issue is not coming, if we disconnect from the meeting properly via the reject call button on the expanded jitsi view.

OK. also want to check if this issue is still experienced when you use 2.1.2-beta.2 in Android?

from capacitor-jitsi-meet.

calvinckho avatar calvinckho commented on June 14, 2024

@calvinckho Thanks for the update, We tested it, now the header bar is not coming. But we found an another bug. if the user closed the PIP window with the close button. the call is not disconnected on jitsi. if you rejoin the call. you can see 3 participants. You can see your name twice. one is current session, another one is the previous dead version. This issue is not coming, if we disconnect from the meeting properly via the reject call button on the expanded jitsi view.

OK. also want to check if this issue is still experienced when you use 2.1.2-beta.2 in Android?

I have tried to reproduce this bug. It tried to open and close the PIP window about 15 times. Out of the 15 times, only 1 time did it fail to leave the call. The other 14 times it was able to leave the call.

Perhaps it is a race condition? But as I was not able to reproduce the issue, it is very difficult to debug it. Also, I cannot merge it with the main branch until this issue is resolved.

from capacitor-jitsi-meet.

calvinckho avatar calvinckho commented on June 14, 2024

2.1.2 is released with the PiP mode disabled on Android because of the instability reported above. For future testing purposes, you can install 2.1.2+ and do the follow to enable PIP mode for Android:

  1. In Capacitor-Jitsi-Meet's AndroidManifest.xml, set android:supportsPictureInPicture="true"
  2. In JitsiActivity.java, uncomment the onStop() handler code (line 170 - 179).

Things to test and report:

  • Please let me know if you experience any issue with closing the PIP window manually.
  • The issue has been reported, but it was difficult to reproduce as it does not happen consistently. It can be due to race condition or other unknown causes.

from capacitor-jitsi-meet.

calvinckho avatar calvinckho commented on June 14, 2024

@calvinckho Thanks for the update, We tested it, now the header bar is not coming. But we found an another bug. if the user closed the PIP window with the close button. the call is not disconnected on jitsi. if you rejoin the call. you can see 3 participants. You can see your name twice. one is current session, another one is the previous dead version. This issue is not coming, if we disconnect from the meeting properly via the reject call button on the expanded jitsi view.

PIP in Android is now fully supported in the 2.2.0 release. The bug mentioned above should be fixed. To enable PIP in Android:

i. In the plugin's AndroidManifest.xml, set supportsPictureInPicture to true.

android:supportsPictureInPicture="true"

ii. Set the featureFlags param 'pip.enabled' to true

featureFlags: { 'pip.enabled': true }

For iOS PIP implementation, as the Jitsi SDK doesn't support native PIP yet, for those who need it in their iOS deployment, I offer consultation service to help you implement it in a non-native way. See this video for a demo:

RPReplay_Final1646465120.MP4

Feel free to DM me for more info.

from capacitor-jitsi-meet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.