-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix type conversion issue in VideoViewController #1620
base: main
Are you sure you want to change the base?
Conversation
Gradle forward compatibility. Tested on a Flutter project using Gradle version 8.3, along with the current Agora SDK Gradle version
Sorry for the late reply, thanks for your contribution. |
No worries. The error we face is a compile time incompatible type error in Flutter projects using more recent versions of Gradle. It is possible that flutter is converting integers to incompatible types when passing them into the VideoViewController.createTextureRender method. The proposed solution follows suit with the solution used for longs, moving away from type casting and using the native java type conversion method. |
I'm wondering what error you are facing, can you share the error logs? I have tried to upgrade our example to Gradle 8.3 and migrate to the new flutter gradle plugin, it works fine without any other code changes included in this PR. |
Relevant section of output from flutter run -v: |
This issue is most likely related to the JDK version. |
I would recommend you use the |
I appreciate your suggestion to utilize Type Inference Limitations: Runtime Over Compile-time Checking: Relying solely on Performance Considerations: Although minimal, the overhead of runtime type checking and the potential for exception handling with Consistency Across Different Data Types: The proposed Given these considerations, while |
What I am concerned about the I think the root cause of the error is related to the type definition of I recommend the |
Gradle forward compatibility. Tested on a Flutter project using Gradle version 8.3, along with the current Agora SDK Gradle version