From 8d1b796ce726c2b31a53df8e2ee9273e0b785f4c Mon Sep 17 00:00:00 2001 From: Pushpam <93931528+Decoder07@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:53:23 +0530 Subject: [PATCH] Removed unused addTrackByDefault Property (#1667) --- .../lib/src/widgets/common_widgets/video_view.dart | 4 ---- .../lib/src/ui/meeting/hms_texture_view.dart | 9 --------- 2 files changed, 13 deletions(-) diff --git a/packages/hms_room_kit/lib/src/widgets/common_widgets/video_view.dart b/packages/hms_room_kit/lib/src/widgets/common_widgets/video_view.dart index c6c3234cd..0154eeac5 100644 --- a/packages/hms_room_kit/lib/src/widgets/common_widgets/video_view.dart +++ b/packages/hms_room_kit/lib/src/widgets/common_widgets/video_view.dart @@ -83,8 +83,6 @@ class _VideoViewState extends State { // Similarly to avoid rebuilding the key should be kept the same for particular HMSVideoView. child: HMSTextureView( controller: widget.videoViewController, - addTrackByDefault: - !context.read().isOffscreen, key: Key(data.item1!.trackId), scaleType: ScaleType.SCALE_ASPECT_FIT, track: data.item1!, @@ -98,8 +96,6 @@ class _VideoViewState extends State { // Similarly to avoid rebuilding the key should be kept the same for particular HMSVideoView. child: HMSTextureView( controller: widget.videoViewController, - addTrackByDefault: - !context.read().isOffscreen, key: Key(data.item1!.trackId), scaleType: ScaleType.SCALE_ASPECT_FILL, track: data.item1!, diff --git a/packages/hmssdk_flutter/lib/src/ui/meeting/hms_texture_view.dart b/packages/hmssdk_flutter/lib/src/ui/meeting/hms_texture_view.dart index 19cc0f15b..da62f1848 100644 --- a/packages/hmssdk_flutter/lib/src/ui/meeting/hms_texture_view.dart +++ b/packages/hmssdk_flutter/lib/src/ui/meeting/hms_texture_view.dart @@ -34,8 +34,6 @@ import 'package:hmssdk_flutter/hmssdk_flutter.dart'; /// **key** - [key] property can be used to forcefully rebuild the video widget by setting a unique key everytime. /// Similarly to avoid rebuilding the key should be kept the same for particular HMSVideoView. /// -/// **addTrackByDefault** - To call addTrack by default as HMSTextureView is attached to the tree. Default value is [true] -/// /// **controller** - To control the video view, this is useful for custom usecases when you wish to control the addTrack and removeTrack /// track functionalities on your own. /// @@ -58,9 +56,6 @@ class HMSTextureView extends StatelessWidget { /// Default is [false] final bool disableAutoSimulcastLayerSelect; - /// [addTrackByDefault] - To call addTrack by default as HMSVideoView is attached to the tree. Default value is [true] - final bool addTrackByDefault; - /// [controller] - To control the video view, this is useful for custom usecases when you wish to control the addTrack and removeTrack /// track functionalities on your own. final HMSTextureViewController? controller; @@ -71,7 +66,6 @@ class HMSTextureView extends StatelessWidget { this.setMirror = false, this.scaleType = ScaleType.SCALE_ASPECT_FIT, this.disableAutoSimulcastLayerSelect = false, - this.addTrackByDefault = true, this.controller}) : super(key: key); @@ -82,7 +76,6 @@ class HMSTextureView extends StatelessWidget { setMirror: setMirror, scaleType: this.scaleType, disableAutoSimulcastLayerSelect: disableAutoSimulcastLayerSelect, - addTrackByDefault: addTrackByDefault, controller: controller, ); } @@ -93,7 +86,6 @@ class _PlatformView extends StatefulWidget { final bool setMirror; final ScaleType scaleType; final bool disableAutoSimulcastLayerSelect; - final bool addTrackByDefault; final HMSTextureViewController? controller; _PlatformView( @@ -102,7 +94,6 @@ class _PlatformView extends StatefulWidget { this.setMirror = false, required this.scaleType, this.disableAutoSimulcastLayerSelect = false, - this.addTrackByDefault = true, this.controller}) : super(key: key);