Agora-Flutter-SDK
Agora-Flutter-SDK copied to clipboard
Release 6.0.0-rc.1 - Old import is not working anymore, should update example adapt to new version
Describe the bug The old import of V5xx is not working with release 6.0.0-rc.1
To Reproduce Steps to reproduce the behavior:
- From Agora version 5.1.0
- Upgrade to 6.0.0-rc.1
- The code with old import occurs errors as image

- A lot of old params and api name changed. Example, old version which i was using "getScreenShareHelper", don't know what is using with new version.
Expected behavior Have docs to update the change from V5xx to V6xx
Desktop (please complete the following information):
- OS: macos
Update: Should update by manual, API params change alot.
The version 6.x is the major update and introduce some break changes, you can check the release note for more detail https://docs.agora.io/en/video-call-4.x/migration_guide_flutter_ng?platform=Flutter.
The import should be import 'package:agora_rtc_engine/agora_rtc_engine.dart', the getScreenShareHelper is no longer needed cause the version > 6.0.0 support multiple streams by default, you can check our example for reference
https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/tree/main/example/lib/examples/advanced
@littleGnAl
Try example build, error when targeting is web ../../flutter/.pub-cache/hosted/pub.dartlang.org/iris_event-1.2.0/lib/iris_event.dart:1:8: Error: Not found: 'dart:ffi' import 'dart:ffi' as ffi; ^ ../lib/src/impl/api_caller.dart:3:8: Error: Not found: 'dart:ffi' import 'dart:ffi' as ffi; ^ ../../flutter/.pub-cache/hosted/pub.dartlang.org/iris_event-1.2.0/lib/src/native_iris_event_bindings.dart:4:8: Error: Not found: 'dart:ffi' import 'dart:ffi' as ffi;
With MacOS, i got this issue:
@ThangD Can you try 6.0.0-rc.2?
@littleGnAl
I tried with 6.0.0-rc.2
Error still occurs with web build.
Btw, i also get this exception, could you pls help to know how to ovewcome?
flutter: #0 _ApiCallExecutor.requestPort (package:agora_rtc_engine/src/impl/api_caller.dart)
#1 _ApiCallExecutor.callIrisApiWithUin8ListAsync (package:agora_rtc_engine/src/impl/api_caller.dart:280:5)
#2 ApiCaller.callIrisApiWithUin8ListAsync (package:agora_rtc_engine/src/impl/api_caller.dart:99:10)
#3 ApiCaller.callIrisApi (package:agora_rtc_engine/src/impl/api_caller.dart:107:12)
#4 RtcEngineImpl.initialize (package:agora_rtc_engine/src/impl/agora_rtc_engine_impl.dart:275:21)
I'm so sorry that the web support on 6.x is still WIP.
@littleGnAl Thank you for your information. How about this one? i sometime got this exception.
Btw, i also get this exception, could you pls help to know how to ovewcome? flutter: #0 _ApiCallExecutor.requestPort (package:agora_rtc_engine/src/impl/api_caller.dart) https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/issues/1 _ApiCallExecutor.callIrisApiWithUin8ListAsync (package:agora_rtc_engine/src/impl/api_caller.dart:280:5) https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/issues/2 ApiCaller.callIrisApiWithUin8ListAsync (package:agora_rtc_engine/src/impl/api_caller.dart:99:10) https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/issues/3 ApiCaller.callIrisApi (package:agora_rtc_engine/src/impl/api_caller.dart:107:12) https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/issues/4 RtcEngineImpl.initialize (package:agora_rtc_engine/src/impl/agora_rtc_engine_impl.dart:275:21)
flutter: LateInitializationError: Field 'requestPort' has not been initialized.
Do you know how to reproduce this error? It seems that you call any API before the RtcEngine.initialize so cause this error.
@littleGnAl with sharing screen, how the remote user view the screen? I tried with uid but not success
AgoraVideoView(
controller: VideoViewController(
rtcEngine: _engine,
canvas: const VideoCanvas(
uid: 'uid',
sourceType: VideoSourceType.videoSourceScreen,
),
))
Please check the example for reference https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/blob/main/example/lib/examples/advanced/screen_sharing/screen_sharing.dart
You should call joinChannelEx to push the screen share stream to the remote users.
https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/blob/e4a76ff35809703b5094d5e26f380924d11684c0/example/lib/examples/advanced/screen_sharing/screen_sharing.dart#L104
Yes, i was. I also tried with example. Example is view the local screen sharing, i tried with screen sharing id but not success.
The join channel button will push the camera/screen sharing stream to the remote in example.
What is the uid will we using? I change the uid(hostId or screenSharingID) of videoSourceScreen but not success

The uid 0 means local stream (camera or screen sharing), not 0 means remote user stream, maybe you can check the basic example to see how it works first
https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/blob/main/example/lib/examples/basic/join_channel_video/join_channel_video.dart
yes, i understand it. I tried with uid (not use 0) which is not working with example.
Can you try start screen sharing then join channel in the example, and view the stream on the web demo see if works or not https://webdemo.agora.io/basicVideoCall/index.html
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.