AgoraIO-Extensions / Agora-Flutter-SDK

Flutter plugin of Agora RTC SDK for Android/iOS/macOS/Windows
https://pub.dev/packages/agora_rtc_engine
MIT License
739 stars 382 forks source link

[LiveStream] Can I display 2 SurfaceView/TextureView of a Host User like picture below? #740

Closed dqcuong2 closed 2 years ago

dqcuong2 commented 2 years ago

Screen Shot 2022-08-23 at 16 26 43

littleGnAl commented 2 years ago

Which platform you are using?

dqcuong2 commented 2 years ago

iOS and Android sir

littleGnAl commented 2 years ago

The agora_rtc_engine plugin does not support this feature, maybe you can try https://pub.dev/packages/agora_rtc_ng if you really need this feature, but it is still in beta.

dqcuong2 commented 2 years ago

@littleGnAl After try this https://pub.dev/packages/agora_rtc_ng. I still can not display a small screen on other of a remote user. Can you help me?

tunytuan90 commented 2 years ago

@littleGnAl After try this https://pub.dev/packages/agora_rtc_ng. I still can not display a small screen on other of a remote user. Can you help me? Did you get the same error?

github-actions[bot] commented 2 years ago

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.

littleGnAl commented 2 years ago

You can try the code snippet below to render multiple local streams:

Stack(
  children: [
    AgoraVideoView(
      controller: VideoViewController(
        rtcEngine: _engine,
        canvas: const VideoCanvas(
            uid: 0, setupMode: VideoViewSetupMode.videoViewSetupAdd),
        useFlutterTexture: _isUseFlutterTexture,
        useAndroidSurfaceView: _isUseAndroidSurfaceView,
      ),
    ),
    Align(
      child: SizedBox(
        width: 300,
        height: 150,
        child: AgoraVideoView(
          controller: VideoViewController(
            rtcEngine: _engine,
            canvas: const VideoCanvas(
                uid: 0,
                setupMode: VideoViewSetupMode.videoViewSetupAdd),
            useFlutterTexture: _isUseFlutterTexture,
            useAndroidSurfaceView: _isUseAndroidSurfaceView,
          ),
        ),
      ),
    ),
  ],
);

If you have a problem with how to render the remote users, maybe you can learn how it works in our example https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/blob/20b0b18d9f9f6b772feedd076463168d72fcfb30/example/lib/examples/basic/join_channel_video/join_channel_video.dart#L145

bigboss5696 commented 2 years ago

Hi @littleGnAl, I am trying to use agora screen sharing to share between AgoraVideoViews in the same channel. But I found that, agora only allows full screen sharing. But I only want to share part of the screen, I don't want to share things other than AgoraVideoView. Any solution help me in this case? I am using agora's example: https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/blob/20b0b18d9f9f6b772feedd076463168d72fcfb30/example/lib/examples/advanced/screen_sharing/screen_sharing.dart

littleGnAl commented 2 years ago

Sharing part of the screen is not supported on mobile.

bigboss5696 commented 2 years ago

Hi @littleGnAl If I use the web, is it possible to do this? Is there any solution to help me overcome this case for mobile?

littleGnAl commented 2 years ago

@bigboss5696 It's so sorry that 6.0.0-rc.2 does not support the web yet, please raise another issue for your cause it's off-topic of this issue, thanks.

github-actions[bot] commented 2 years ago

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] commented 1 year ago

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.