File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -46,39 +46,19 @@ class _CallScreenState extends State<CallScreen> {
4646 late final _userChatRepo = locator.get <UserChatRepository >();
4747 late final _videoEffectsManager =
4848 widget.videoEffectsManager ?? StreamVideoEffectsManager (widget.call);
49- late StreamSubscription <SpeakingWhileMutedState > _speechSubscription;
5049
5150 Channel ? _channel;
5251 ParticipantLayoutMode _currentLayoutMode = ParticipantLayoutMode .grid;
5352 bool _moreMenuVisible = false ;
54- late SpeakingWhileMutedRecognition _speakingWhileMutedRecognition;
5553
5654 @override
5755 void initState () {
5856 super .initState ();
5957 _connectChatChannel ();
60- _speakingWhileMutedRecognition =
61- SpeakingWhileMutedRecognition (call: widget.call);
62- _speechSubscription = _speakingWhileMutedRecognition.stream.listen ((state) {
63- final context = this .context;
64- if (state.isSpeakingWhileMuted && context.mounted) {
65- final colorTheme = StreamVideoTheme .of (context).colorTheme;
66-
67- ScaffoldMessenger .maybeOf (context)? .showSnackBar (
68- SnackBar (
69- content: const Text ('You are speaking while muted' ),
70- behavior: SnackBarBehavior .floating,
71- backgroundColor: colorTheme.accentPrimary,
72- ),
73- );
74- }
75- });
7658 }
7759
7860 @override
7961 void dispose () {
80- _speechSubscription.cancel ();
81- _speakingWhileMutedRecognition.dispose ();
8262 widget.call.leave ();
8363 _userChatRepo.disconnectUser ();
8464 _videoEffectsManager.dispose ();
You can’t perform that action at this time.
0 commit comments