Skip to content
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
2 changes: 2 additions & 0 deletions dogfooding/lib/app/app_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ class _StreamDogFoodingAppContentState
if (_router.routerDelegate.navigatorKey.currentContext == null) {
// App is not running yet. Postpone consuming after app is in the foreground
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
if (!locator.isRegistered<StreamVideo>()) return;

final streamVideo = locator.get<StreamVideo>();
streamVideo.consumeAndAcceptActiveCall(
onCallAccepted: (call) {
Expand Down
5 changes: 5 additions & 0 deletions packages/stream_video/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Upcoming

### ✅ Added
* Added `hintHighScaleLivestreamPublisher` parameter to `Call.join()` to allow marking the participant as publishing to a large audience.

## 1.3.2

### 🐞 Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/stream_video/lib/globals.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'protobuf/video/sfu/models/models.pb.dart';

const String streamSdkName = 'stream-flutter';
const String streamVideoVersion = '1.3.2';
const String openapiModelsVersion = '225.2.0';
const String openapiModelsVersion = '225.14.0';
const String protocolModelsVersion = '1.46.1';
const String androidWebRTCVersion = webrtc.androidWebRTCVersion;
const String iosWebRTCVersion = webrtc.iosWebRTCVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,37 @@ part of openapi.api;
class CallStatsParticipantCounts {
/// Returns a new [CallStatsParticipantCounts] instance.
CallStatsParticipantCounts({
this.averageJitterMs,
this.averageLatencyMs,
this.callEventCount,
this.cqScore,
required this.liveSessions,
this.maxFreezesDurationMs,
required this.participants,
required this.peakConcurrentSessions,
required this.peakConcurrentUsers,
required this.publishers,
required this.sessions,
required this.sfusUsed,
this.totalParticipantDuration,
});

///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? averageJitterMs;

///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? averageLatencyMs;

///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
Expand All @@ -42,6 +62,14 @@ class CallStatsParticipantCounts {

int liveSessions;

///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? maxFreezesDurationMs;

int participants;

int peakConcurrentSessions;
Expand All @@ -52,6 +80,8 @@ class CallStatsParticipantCounts {

int sessions;

int sfusUsed;

///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
Expand All @@ -64,37 +94,55 @@ class CallStatsParticipantCounts {
bool operator ==(Object other) =>
identical(this, other) ||
other is CallStatsParticipantCounts &&
other.averageJitterMs == averageJitterMs &&
other.averageLatencyMs == averageLatencyMs &&
other.callEventCount == callEventCount &&
other.cqScore == cqScore &&
other.liveSessions == liveSessions &&
other.maxFreezesDurationMs == maxFreezesDurationMs &&
other.participants == participants &&
other.peakConcurrentSessions == peakConcurrentSessions &&
other.peakConcurrentUsers == peakConcurrentUsers &&
other.publishers == publishers &&
other.sessions == sessions &&
other.sfusUsed == sfusUsed &&
other.totalParticipantDuration == totalParticipantDuration;

@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(averageJitterMs == null ? 0 : averageJitterMs!.hashCode) +
(averageLatencyMs == null ? 0 : averageLatencyMs!.hashCode) +
(callEventCount == null ? 0 : callEventCount!.hashCode) +
(cqScore == null ? 0 : cqScore!.hashCode) +
(liveSessions.hashCode) +
(maxFreezesDurationMs == null ? 0 : maxFreezesDurationMs!.hashCode) +
(participants.hashCode) +
(peakConcurrentSessions.hashCode) +
(peakConcurrentUsers.hashCode) +
(publishers.hashCode) +
(sessions.hashCode) +
(sfusUsed.hashCode) +
(totalParticipantDuration == null
? 0
: totalParticipantDuration!.hashCode);

@override
String toString() =>
'CallStatsParticipantCounts[callEventCount=$callEventCount, cqScore=$cqScore, liveSessions=$liveSessions, participants=$participants, peakConcurrentSessions=$peakConcurrentSessions, peakConcurrentUsers=$peakConcurrentUsers, publishers=$publishers, sessions=$sessions, totalParticipantDuration=$totalParticipantDuration]';
'CallStatsParticipantCounts[averageJitterMs=$averageJitterMs, averageLatencyMs=$averageLatencyMs, callEventCount=$callEventCount, cqScore=$cqScore, liveSessions=$liveSessions, maxFreezesDurationMs=$maxFreezesDurationMs, participants=$participants, peakConcurrentSessions=$peakConcurrentSessions, peakConcurrentUsers=$peakConcurrentUsers, publishers=$publishers, sessions=$sessions, sfusUsed=$sfusUsed, totalParticipantDuration=$totalParticipantDuration]';

Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.averageJitterMs != null) {
json[r'average_jitter_ms'] = this.averageJitterMs;
} else {
json[r'average_jitter_ms'] = null;
}
if (this.averageLatencyMs != null) {
json[r'average_latency_ms'] = this.averageLatencyMs;
} else {
json[r'average_latency_ms'] = null;
}
if (this.callEventCount != null) {
json[r'call_event_count'] = this.callEventCount;
} else {
Expand All @@ -106,11 +154,17 @@ class CallStatsParticipantCounts {
json[r'cq_score'] = null;
}
json[r'live_sessions'] = this.liveSessions;
if (this.maxFreezesDurationMs != null) {
json[r'max_freezes_duration_ms'] = this.maxFreezesDurationMs;
} else {
json[r'max_freezes_duration_ms'] = null;
}
json[r'participants'] = this.participants;
json[r'peak_concurrent_sessions'] = this.peakConcurrentSessions;
json[r'peak_concurrent_users'] = this.peakConcurrentUsers;
json[r'publishers'] = this.publishers;
json[r'sessions'] = this.sessions;
json[r'sfus_used'] = this.sfusUsed;
if (this.totalParticipantDuration != null) {
json[r'total_participant_duration'] = this.totalParticipantDuration;
} else {
Expand Down Expand Up @@ -154,20 +208,29 @@ class CallStatsParticipantCounts {
'Required key "CallStatsParticipantCounts[sessions]" is missing from JSON.');
assert(json[r'sessions'] != null,
'Required key "CallStatsParticipantCounts[sessions]" has a null value in JSON.');
assert(json.containsKey(r'sfus_used'),
'Required key "CallStatsParticipantCounts[sfus_used]" is missing from JSON.');
assert(json[r'sfus_used'] != null,
'Required key "CallStatsParticipantCounts[sfus_used]" has a null value in JSON.');
return true;
}());

return CallStatsParticipantCounts(
averageJitterMs: mapValueOfType<int>(json, r'average_jitter_ms'),
averageLatencyMs: mapValueOfType<int>(json, r'average_latency_ms'),
callEventCount: mapValueOfType<int>(json, r'call_event_count'),
cqScore: mapValueOfType<int>(json, r'cq_score'),
liveSessions: mapValueOfType<int>(json, r'live_sessions')!,
maxFreezesDurationMs:
mapValueOfType<int>(json, r'max_freezes_duration_ms'),
participants: mapValueOfType<int>(json, r'participants')!,
peakConcurrentSessions:
mapValueOfType<int>(json, r'peak_concurrent_sessions')!,
peakConcurrentUsers:
mapValueOfType<int>(json, r'peak_concurrent_users')!,
publishers: mapValueOfType<int>(json, r'publishers')!,
sessions: mapValueOfType<int>(json, r'sessions')!,
sfusUsed: mapValueOfType<int>(json, r'sfus_used')!,
totalParticipantDuration:
mapValueOfType<int>(json, r'total_participant_duration'),
);
Expand Down Expand Up @@ -232,5 +295,6 @@ class CallStatsParticipantCounts {
'peak_concurrent_users',
'publishers',
'sessions',
'sfus_used',
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ class CallStatsParticipantSession {
this.currentSfu,
this.distanceToSfuKilometers,
this.endedAt,
this.freezesDurationMs,
required this.isLive,
this.jitterMs,
this.latencyMs,
this.location,
this.os,
required this.publishedTracks,
Expand Down Expand Up @@ -89,8 +92,32 @@ class CallStatsParticipantSession {
///
DateTime? endedAt;

///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? freezesDurationMs;

bool isLive;

///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? jitterMs;

///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
int? latencyMs;

///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
Expand Down Expand Up @@ -170,7 +197,10 @@ class CallStatsParticipantSession {
other.currentSfu == currentSfu &&
other.distanceToSfuKilometers == distanceToSfuKilometers &&
other.endedAt == endedAt &&
other.freezesDurationMs == freezesDurationMs &&
other.isLive == isLive &&
other.jitterMs == jitterMs &&
other.latencyMs == latencyMs &&
other.location == location &&
other.os == os &&
other.publishedTracks == publishedTracks &&
Expand All @@ -194,7 +224,10 @@ class CallStatsParticipantSession {
? 0
: distanceToSfuKilometers!.hashCode) +
(endedAt == null ? 0 : endedAt!.hashCode) +
(freezesDurationMs == null ? 0 : freezesDurationMs!.hashCode) +
(isLive.hashCode) +
(jitterMs == null ? 0 : jitterMs!.hashCode) +
(latencyMs == null ? 0 : latencyMs!.hashCode) +
(location == null ? 0 : location!.hashCode) +
(os == null ? 0 : os!.hashCode) +
(publishedTracks.hashCode) +
Expand All @@ -208,7 +241,7 @@ class CallStatsParticipantSession {

@override
String toString() =>
'CallStatsParticipantSession[browser=$browser, browserVersion=$browserVersion, cqScore=$cqScore, currentIp=$currentIp, currentSfu=$currentSfu, distanceToSfuKilometers=$distanceToSfuKilometers, endedAt=$endedAt, isLive=$isLive, location=$location, os=$os, publishedTracks=$publishedTracks, publisherType=$publisherType, sdk=$sdk, sdkVersion=$sdkVersion, startedAt=$startedAt, unifiedSessionId=$unifiedSessionId, userSessionId=$userSessionId, webrtcVersion=$webrtcVersion]';
'CallStatsParticipantSession[browser=$browser, browserVersion=$browserVersion, cqScore=$cqScore, currentIp=$currentIp, currentSfu=$currentSfu, distanceToSfuKilometers=$distanceToSfuKilometers, endedAt=$endedAt, freezesDurationMs=$freezesDurationMs, isLive=$isLive, jitterMs=$jitterMs, latencyMs=$latencyMs, location=$location, os=$os, publishedTracks=$publishedTracks, publisherType=$publisherType, sdk=$sdk, sdkVersion=$sdkVersion, startedAt=$startedAt, unifiedSessionId=$unifiedSessionId, userSessionId=$userSessionId, webrtcVersion=$webrtcVersion]';

Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
Expand Down Expand Up @@ -247,7 +280,22 @@ class CallStatsParticipantSession {
} else {
json[r'ended_at'] = null;
}
if (this.freezesDurationMs != null) {
json[r'freezes_duration_ms'] = this.freezesDurationMs;
} else {
json[r'freezes_duration_ms'] = null;
}
json[r'is_live'] = this.isLive;
if (this.jitterMs != null) {
json[r'jitter_ms'] = this.jitterMs;
} else {
json[r'jitter_ms'] = null;
}
if (this.latencyMs != null) {
json[r'latency_ms'] = this.latencyMs;
} else {
json[r'latency_ms'] = null;
}
if (this.location != null) {
json[r'location'] = this.location;
} else {
Expand Down Expand Up @@ -328,7 +376,10 @@ class CallStatsParticipantSession {
distanceToSfuKilometers:
mapValueOfType<double>(json, r'distance_to_sfu_kilometers'),
endedAt: mapDateTime(json, r'ended_at', r''),
freezesDurationMs: mapValueOfType<int>(json, r'freezes_duration_ms'),
isLive: mapValueOfType<bool>(json, r'is_live')!,
jitterMs: mapValueOfType<int>(json, r'jitter_ms'),
latencyMs: mapValueOfType<int>(json, r'latency_ms'),
location: CallStatsLocation.fromJson(json[r'location']),
os: mapValueOfType<String>(json, r'os'),
publishedTracks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class JoinCallRequest {
JoinCallRequest({
this.create,
this.data,
this.hintHighScaleLivestreamPublisher,
required this.location,
this.membersLimit,
this.migratingFrom,
Expand All @@ -41,6 +42,15 @@ class JoinCallRequest {
///
CallRequest? data;

/// if true, the participant will be marked as publsihing to large audience
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? hintHighScaleLivestreamPublisher;

String location;

/// Maximum value: 100
Expand Down Expand Up @@ -95,6 +105,8 @@ class JoinCallRequest {
other is JoinCallRequest &&
other.create == create &&
other.data == data &&
other.hintHighScaleLivestreamPublisher ==
hintHighScaleLivestreamPublisher &&
other.location == location &&
other.membersLimit == membersLimit &&
other.migratingFrom == migratingFrom &&
Expand All @@ -108,6 +120,9 @@ class JoinCallRequest {
// ignore: unnecessary_parenthesis
(create == null ? 0 : create!.hashCode) +
(data == null ? 0 : data!.hashCode) +
(hintHighScaleLivestreamPublisher == null
? 0
: hintHighScaleLivestreamPublisher!.hashCode) +
(location.hashCode) +
(membersLimit == null ? 0 : membersLimit!.hashCode) +
(migratingFrom == null ? 0 : migratingFrom!.hashCode) +
Expand All @@ -118,7 +133,7 @@ class JoinCallRequest {

@override
String toString() =>
'JoinCallRequest[create=$create, data=$data, location=$location, membersLimit=$membersLimit, migratingFrom=$migratingFrom, migratingFromList=$migratingFromList, notify=$notify, ring=$ring, video=$video]';
'JoinCallRequest[create=$create, data=$data, hintHighScaleLivestreamPublisher=$hintHighScaleLivestreamPublisher, location=$location, membersLimit=$membersLimit, migratingFrom=$migratingFrom, migratingFromList=$migratingFromList, notify=$notify, ring=$ring, video=$video]';

Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
Expand All @@ -132,6 +147,12 @@ class JoinCallRequest {
} else {
json[r'data'] = null;
}
if (this.hintHighScaleLivestreamPublisher != null) {
json[r'hint_high_scale_livestream_publisher'] =
this.hintHighScaleLivestreamPublisher;
} else {
json[r'hint_high_scale_livestream_publisher'] = null;
}
json[r'location'] = this.location;
if (this.membersLimit != null) {
json[r'members_limit'] = this.membersLimit;
Expand Down Expand Up @@ -183,6 +204,8 @@ class JoinCallRequest {
return JoinCallRequest(
create: mapValueOfType<bool>(json, r'create'),
data: CallRequest.fromJson(json[r'data']),
hintHighScaleLivestreamPublisher:
mapValueOfType<bool>(json, r'hint_high_scale_livestream_publisher'),
location: mapValueOfType<String>(json, r'location')!,
membersLimit: mapValueOfType<int>(json, r'members_limit'),
migratingFrom: mapValueOfType<String>(json, r'migrating_from'),
Expand Down
Loading
Loading