Agora-Flutter-SDK icon indicating copy to clipboard operation
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

Open ThangD opened this issue 3 years ago • 16 comments

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:

  1. From Agora version 5.1.0
  2. Upgrade to 6.0.0-rc.1
  3. The code with old import occurs errors as image image
  4. 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.

ThangD avatar Sep 15 '22 11:09 ThangD

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 avatar Sep 15 '22 16:09 littleGnAl

@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:

image

ThangD avatar Sep 16 '22 09:09 ThangD

@ThangD Can you try 6.0.0-rc.2?

littleGnAl avatar Sep 16 '22 10:09 littleGnAl

@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) flutter: LateInitializationError: Field 'requestPort' has not been initialized.

ThangD avatar Sep 19 '22 11:09 ThangD

I'm so sorry that the web support on 6.x is still WIP.

littleGnAl avatar Sep 20 '22 02:09 littleGnAl

@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.

ThangD avatar Sep 20 '22 02:09 ThangD

Do you know how to reproduce this error? It seems that you call any API before the RtcEngine.initialize so cause this error.

littleGnAl avatar Sep 20 '22 03:09 littleGnAl

@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,
                      ),
                    ))

ThangD avatar Sep 20 '22 09:09 ThangD

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

littleGnAl avatar Sep 20 '22 10:09 littleGnAl

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

littleGnAl avatar Sep 20 '22 10:09 littleGnAl

Yes, i was. I also tried with example. Example is view the local screen sharing, i tried with screen sharing id but not success.

ThangD avatar Sep 20 '22 10:09 ThangD

The join channel button will push the camera/screen sharing stream to the remote in example.

littleGnAl avatar Sep 20 '22 10:09 littleGnAl

What is the uid will we using? I change the uid(hostId or screenSharingID) of videoSourceScreen but not success image

ThangD avatar Sep 20 '22 10:09 ThangD

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

littleGnAl avatar Sep 20 '22 10:09 littleGnAl

yes, i understand it. I tried with uid (not use 0) which is not working with example.

ThangD avatar Sep 20 '22 11:09 ThangD

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

littleGnAl avatar Sep 21 '22 02:09 littleGnAl

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.

github-actions[bot] avatar Oct 06 '22 17:10 github-actions[bot]

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.

github-actions[bot] avatar Dec 05 '22 03:12 github-actions[bot]

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.

github-actions[bot] avatar Apr 28 '23 09:04 github-actions[bot]