Skip to content
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

layoutType: Layout.floating error on hostcontrol and pin #163

Open
BulbulH opened this issue Oct 29, 2023 · 2 comments
Open

layoutType: Layout.floating error on hostcontrol and pin #163

BulbulH opened this issue Oct 29, 2023 · 2 comments

Comments

@BulbulH
Copy link

BulbulH commented Oct 29, 2023

E/FrameEvents(18167): updateAcquireFence: Did not find frame.
D/CCodec (18167): ISConfig not changed
D/CCodecConfig(18167): c2 config diff is c2::u32 coded.bitrate.value = 599000

======== Exception caught by gesture ===============================================================
The following _TypeError was thrown while handling a gesture:
Null check operator used on a null value

When the exception was thrown, this was the stack:
#0 hostControl (package:agora_uikit/controllers/rtm_mute_request.dart:28:41)
#1 _HostControlsState.build.. (package:agora_uikit/src/layout/widgets/host_controls.dart:34:15)
#2 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:275:24)
#3 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:654:11)
#4 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:311:5)
#5 BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:281:7)
#6 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:167:27)
#7 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:469:20)
#8 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:445:22)
#9 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:331:11)
#10 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:400:7)
#11 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:363:5)
#12 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:320:7)
#13 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:293:9)
#14 _invoke1 (dart:ui/hooks.dart:158:13)
#15 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:382:7)
#16 _dispatchPointerDataPacket (dart:ui/hooks.dart:91:31)
Handler: "onTap"
Recognizer: TapGestureRecognizer#cbbc7
debugOwner: GestureDetector
state: ready
won arena
finalPosition: Offset(125.8, 110.2)
finalLocalPosition: Offset(23.9, 14.3)
button: 1
sent tap down

======== Exception caught by widgets library =======================================================
The following assertion was thrown building:
Remote uid can not be null or 0
'package:agora_rtc_engine/src/render/video_view_controller.dart':
Failed assertion: line 81 pos 16: 'canvas.uid != null && canvas.uid != 0'

When the exception was thrown, this was the stack:
#2 new VideoViewController.remote (package:agora_rtc_engine/src/render/video_view_controller.dart:81:16)
#3 _FloatingLayoutState._getRemoteViews (package:agora_uikit/src/layout/floating_layout.dart:88:39)
#4 _FloatingLayoutState._viewFloat. (package:agora_uikit/src/layout/floating_layout.dart:329:57)
#5 SliverChildBuilderDelegate.build (package:flutter/src/widgets/scroll_delegate.dart:489:22)
#6 SliverMultiBoxAdaptorElement._build (package:flutter/src/widgets/sliver.dart:828:28)
#7 SliverMultiBoxAdaptorElement.performRebuild.processElement (package:flutter/src/widgets/sliver.dart:758:67)
#8 Iterable.forEach (dart:core/iterable.dart:346:35)
#9 SliverMultiBoxAdaptorElement.performRebuild (package:flutter/src/widgets/sliver.dart:805:24)
#10 SliverMultiBoxAdaptorElement.update (package:flutter/src/widgets/sliver.dart:734:7)
#11 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#12 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5111:16)
#13 Element.rebuild (package:flutter/src/widgets/framework.dart:4805:7)
#14 ProxyElement.update (package:flutter/src/widgets/framework.dart:5417:5)
#15 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)
#16 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6442:14)
#17 Element.updateChild (package:flutter/src/widgets/framework.dart:3686:15)

@BulbulH BulbulH changed the title layoutType: Layout.floating on hostcontrol and ping layoutType: Layout.floating on hostcontrol and pin Oct 29, 2023
@BulbulH BulbulH changed the title layoutType: Layout.floating on hostcontrol and pin layoutType: Layout.floating error on hostcontrol and pin Oct 29, 2023
@BulbulH
Copy link
Author

BulbulH commented Oct 29, 2023

uses:

void initAgoraUikit() async {
client = AgoraClient(
agoraConnectionData: AgoraConnectionData(
appId: appId,
channelName:widget.channelName,
uid: widget.uid,
username: widget.username,
tempToken: getTokenAgora()
),

    agoraChannelData: AgoraChannelData(
      clientRoleType: ClientRoleType.clientRoleBroadcaster,
    )

);

await client!.initialize();

}

Expanded(
child: Stack(
children: [
AgoraVideoViewer(
client: client!,
layoutType: Layout.floating,
enableHostControls: widget.isHost, // Add this to enable host controls
showAVState: true,

              ),
              AgoraVideoButtons(
                client: client!,
                autoHideButtons: true,
                autoHideButtonTime: 3,

                onDisconnect: (){
                  Get.back();
                },

                addScreenSharing: true, // Add this to enable screen sharing
              ),
            ],
          ),
        ),

@Meherdeep
Copy link
Contributor

@BulbulH Can you please check if you're using the latest version of the UIKit. Also, it would be great if you could share steps to reproduce the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants