From 893b6c7f783affd69e9d94289d71474d706d7aeb Mon Sep 17 00:00:00 2001 From: littleGnAl Date: Mon, 22 Apr 2024 22:04:24 +0800 Subject: [PATCH] fix: AgoraVideoView takes over the whole browser window --- .../platform/web/global_video_view_controller_platform_web.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/impl/platform/web/global_video_view_controller_platform_web.dart b/lib/src/impl/platform/web/global_video_view_controller_platform_web.dart index 0f2fce87a..73a564ac6 100644 --- a/lib/src/impl/platform/web/global_video_view_controller_platform_web.dart +++ b/lib/src/impl/platform/web/global_video_view_controller_platform_web.dart @@ -20,6 +20,8 @@ class _View { ..id = _getViewType(platformViewId) ..style.width = '100%' ..style.height = '100%' { + // Wait until the element is injected into the DOM, + // see https://github.com/flutter/flutter/issues/143922#issuecomment-1960133128 final observer = html.IntersectionObserver((entries, observer) { if (_element.isConnected == true) { observer.unobserve(_element);