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

fix: fix monitorStats not started when sender == null. #606

Merged
merged 3 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion example/lib/pages/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class _RoomPageState extends State<RoomPage> {
(timeStamp) => Navigator.popUntil(context, (route) => route.isFirst));
})
..on<ParticipantEvent>((event) {
print('Participant event');
// sort participants on many track events as noted in documentation linked above
_sortParticipants();
})
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {

// Any event emitted will trigger ChangeNotifier
events.listen((event) {
logger.fine('[RoomEvent] $event, will notifyListeners()');
logger.finer('[RoomEvent] $event, will notifyListeners()');
notifyListeners();
});

Expand Down
2 changes: 1 addition & 1 deletion lib/src/participant/participant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ abstract class Participant<T extends TrackPublication>
}) : _name = name {
// Any event emitted will trigger ChangeNotifier
events.listen((event) {
logger.fine('[ParticipantEvent] $event, will notifyListeners()');
logger.finer('[ParticipantEvent] $event, will notifyListeners()');
notifyListeners();
});

Expand Down
2 changes: 1 addition & 1 deletion lib/src/publication/remote.dart
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class RemoteTrackPublication<T extends RemoteTrack>
);

newValue.onVideoViewBuild = (_) {
logger.fine('[Visibility] VideoView did build');
logger.finer('[Visibility] VideoView did build');
if (_lastSentTrackSettings?.disabled == true) {
// quick enable
_cancelPendingTrackSettingsUpdateRequest?.call();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/track/local/audio.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class LocalAudioTrack extends LocalTrack

@override
Future<bool> monitorStats() async {
if (sender == null || events.isDisposed || !isActive) {
if (events.isDisposed || !isActive) {
_currentBitrate = 0;
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/track/local/video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class LocalVideoTrack extends LocalTrack with VideoTrack {

@override
Future<bool> monitorStats() async {
if (sender == null || events.isDisposed || !isActive) {
if (events.isDisposed || !isActive) {
_currentBitrate = 0;
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/track/track.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ abstract class Track extends DisposableChangeNotifier
{this.receiver}) {
// Any event emitted will trigger ChangeNotifier
events.listen((event) {
logger.fine('[TrackEvent] $event, will notifyListeners()');
logger.finer('[TrackEvent] $event, will notifyListeners()');
notifyListeners();
});

Expand Down
Loading