File tree Expand file tree Collapse file tree 2 files changed +17
-16
lines changed
Expand file tree Collapse file tree 2 files changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,16 @@ class RoomContext extends ChangeNotifier with ChatContextMixin {
134134 Debug .event (
135135 'RoomContext: LocalTrackUnpublishedEvent track = ${event .publication .sid }' );
136136 _buildParticipants ();
137+ })
138+ ..on < TrackMutedEvent > ((event) {
139+ Debug .event (
140+ 'RoomContext: TrackMutedEvent $roomName participant = ${event .participant .identity } track = ${event .publication .sid }' );
141+ _buildParticipants ();
142+ })
143+ ..on < TrackUnmutedEvent > ((event) {
144+ Debug .event (
145+ 'RoomContext: TrackUnmutedEvent $roomName participant = ${event .participant .identity } track = ${event .publication .sid }' );
146+ _buildParticipants ();
137147 });
138148
139149 if (connect && url != null && token != null ) {
Original file line number Diff line number Diff line change @@ -92,22 +92,13 @@ class _SoundWaveformWidgetState extends State<SoundWaveformWidget>
9292
9393 void _startVisualizer (AudioTrack ? track) async {
9494 _listener = track? .createListener ();
95- _listener
96- ? ..on < AudioVisualizerEvent > ((e) {
97- if (mounted) {
98- setState (() {
99- samples =
100- e.event.map ((e) => ((e as num ) * 100 ).toDouble ()).toList ();
101- });
102- }
103- })
104- ..on < TrackMutedEvent > ((e) {
105- if (mounted) {
106- setState (() {
107- samples = List .filled (samples.length, 0 );
108- });
109- }
110- });
95+ _listener? .on < AudioVisualizerEvent > ((e) {
96+ if (mounted) {
97+ setState (() {
98+ samples = e.event.map ((e) => ((e as num ) * 100 ).toDouble ()).toList ();
99+ });
100+ }
101+ });
111102 }
112103
113104 void _stopVisualizer () async {
You can’t perform that action at this time.
0 commit comments