Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ extension on CallMetadata {
roles: user?.roles ?? [participant.role],
name: user?.name ?? '',
custom: user?.custom ?? {},
customData: user?.custom ?? {},
image: user?.image ?? '',
sessionId: sessionId,
isLocal: isLocal,
Expand All @@ -284,6 +285,7 @@ extension on CallMetadata {
roles: user?.roles ?? [participant.role],
name: user?.name ?? '',
custom: user?.custom ?? {},
customData: user?.custom ?? {},
image: user?.image ?? '',
sessionId: participant.userSessionId,
trackIdPrefix: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ mixin StateSfuMixin on StateNotifier<CallState>, StatePendingTracksMixin {
roles: event.participant.roles,
name: event.participant.userName,
custom: event.participant.custom,
customData: event.participant.customData,
image: event.participant.userImage,
sessionId: event.participant.sessionId,
trackIdPrefix: event.participant.trackLookupPrefix,
Expand Down Expand Up @@ -274,6 +275,7 @@ mixin StateSfuMixin on StateNotifier<CallState>, StatePendingTracksMixin {
.copyWith(
name: participant.userName,
custom: participant.custom,
customData: participant.customData,
image: participant.userImage,
trackIdPrefix: participant.trackLookupPrefix,
isSpeaking: participant.isSpeaking,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class CallParticipantState
required this.roles,
required this.name,
required this.custom,
this.customData = const {},
this.image,
required this.sessionId,
required this.trackIdPrefix,
Expand All @@ -46,6 +47,7 @@ class CallParticipantState
required this.roles,
required this.name,
required this.custom,
required this.customData,
required this.image,
required this.sessionId,
required this.trackIdPrefix,
Expand All @@ -68,7 +70,9 @@ class CallParticipantState
final String userId;
final List<String> roles;
final String name;
@Deprecated('Use customData instead')
final Map<String, Object?> custom;
final Map<String, Object?> customData;
final String? image;
final String sessionId;
final String trackIdPrefix;
Expand Down Expand Up @@ -111,6 +115,7 @@ class CallParticipantState
List<String>? roles,
String? name,
Map<String, Object?>? custom,
Map<String, Object?>? customData,
String? image,
String? sessionId,
String? trackIdPrefix,
Expand All @@ -134,6 +139,7 @@ class CallParticipantState
roles: roles ?? this.roles,
name: name ?? this.name,
custom: custom ?? this.custom,
customData: customData ?? this.customData,
image: image ?? this.image,
sessionId: sessionId ?? this.sessionId,
trackIdPrefix: trackIdPrefix ?? this.trackIdPrefix,
Expand Down Expand Up @@ -181,6 +187,7 @@ class CallParticipantState
roles: roles,
name: name,
custom: custom,
customData: customData,
image: image,
sessionId: sessionId,
trackIdPrefix: trackIdPrefix,
Expand Down Expand Up @@ -213,6 +220,7 @@ class CallParticipantState
roles: roles,
name: name,
custom: custom,
customData: customData,
image: image,
sessionId: sessionId,
trackIdPrefix: trackIdPrefix,
Expand Down Expand Up @@ -272,6 +280,7 @@ class CallParticipantState
roles,
name,
custom,
customData,
image,
sessionId,
trackIdPrefix,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ extension SfuParticipantExtension on sfu_models.Participant {
userImage: image,
sessionId: sessionId,
custom: custom.fields,
customData: (custom.toProto3Json() as Map<String, Object?>?) ?? {},
publishedTracks: publishedTracks
.map(
(track) => track.toDomain(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class SfuParticipant with EquatableMixin {
required this.userImage,
required this.sessionId,
required this.custom,
required this.customData,
required this.publishedTracks,
required this.joinedAt,
required this.trackLookupPrefix,
Expand All @@ -27,6 +28,7 @@ class SfuParticipant with EquatableMixin {
final String userImage;
final String sessionId;
final Map<String, Object?> custom;
final Map<String, Object?> customData;
final List<SfuTrackType> publishedTracks;
final DateTime joinedAt;
final String trackLookupPrefix;
Expand All @@ -43,6 +45,7 @@ class SfuParticipant with EquatableMixin {
String? userImage,
String? sessionId,
Map<String, Object?>? custom,
Map<String, Object?>? customData,
List<SfuTrackType>? publishedTracks,
DateTime? joinedAt,
String? trackLookupPrefix,
Expand All @@ -58,6 +61,7 @@ class SfuParticipant with EquatableMixin {
userImage: userId ?? this.userImage,
sessionId: sessionId ?? this.sessionId,
custom: custom ?? this.custom,
customData: customData ?? this.customData,
publishedTracks: publishedTracks ?? this.publishedTracks,
joinedAt: joinedAt ?? this.joinedAt,
trackLookupPrefix: trackLookupPrefix ?? this.trackLookupPrefix,
Expand Down Expand Up @@ -87,6 +91,7 @@ class SfuParticipant with EquatableMixin {
userImage,
sessionId,
custom,
customData,
publishedTracks,
joinedAt,
trackLookupPrefix,
Expand Down
1 change: 1 addition & 0 deletions packages/stream_video/lib/src/sfu/sfu_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ extension SfuParticipantX on SfuParticipant {
roles: roles.isNotEmpty ? roles : existingRoles,
name: userName.ifEmpty(() => existingName),
custom: custom,
customData: customData,
image: userImage.ifEmpty(() => existingImage),
sessionId: sessionId,
trackIdPrefix: trackLookupPrefix,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void main() {
userImage: '',
sessionId: 'remote-session',
custom: const {},
customData: const {},
publishedTracks: const [],
joinedAt: DateTime.now(),
trackLookupPrefix: 'remote-track-123',
Expand Down Expand Up @@ -98,6 +99,7 @@ void main() {
userImage: '',
sessionId: 'remote-session',
custom: const {},
customData: const {},
publishedTracks: const [],
joinedAt: DateTime.now(),
trackLookupPrefix: 'remote-track-123',
Expand Down Expand Up @@ -158,6 +160,7 @@ void main() {
userImage: '',
sessionId: 'remote-session',
custom: const {},
customData: const {},
publishedTracks: const [],
joinedAt: DateTime.now(),
trackLookupPrefix: 'remote-track-123',
Expand Down Expand Up @@ -226,6 +229,7 @@ void main() {
userImage: '',
sessionId: 'remote-session',
custom: const {},
customData: const {},
publishedTracks: const [],
joinedAt: DateTime.now(),
trackLookupPrefix: 'remote-track-123',
Expand Down Expand Up @@ -315,6 +319,7 @@ void main() {
userImage: '',
sessionId: 'remote-session',
custom: const {},
customData: const {},
publishedTracks: const [],
joinedAt: DateTime.now(),
trackLookupPrefix: 'remote-track-123',
Expand Down
Loading