Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions dogfooding/lib/core/repos/user_auth_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ class UserAuthRepository {
final response = await videoClient.connect();

return response.fold(
success: (success) {
return UserCredentials(token: success.data, userInfo: currentUser);
onSuccess: (success) {
return UserCredentials(token: success, userInfo: currentUser);
},
failure: (failure) {
throw failure.error;
onFailure: (error, stackTrace) {
throw error.toVideoError(stackTrace);
},
);
}
Expand Down
3 changes: 2 additions & 1 deletion dogfooding/lib/screens/call_participants_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class CallParticipantsList extends StatelessWidget {
final textTheme = streamVideoTheme.textTheme;

return StreamBuilder<CallState>(
stream: call.state.asStream(),
initialData: call.state.value,
stream: call.state,
builder: (context, snapshot) {
final callState = snapshot.requireData;
final participants = callState.callParticipants;
Expand Down
6 changes: 3 additions & 3 deletions dogfooding/lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class _HomeScreenState extends State<HomeScreen> {
);

result.fold(
success: (success) {
onSuccess: (_) {
if (mounted) {
if (isRinging) {
CallRoute(
Expand All @@ -122,11 +122,11 @@ class _HomeScreenState extends State<HomeScreen> {
}
}
},
failure: (failure) {
onFailure: (error, stackTrace) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
duration: const Duration(seconds: 20),
content: Text('Error: ${failure.error.message}'),
content: Text('Error: $error'),
),
);
},
Expand Down
6 changes: 3 additions & 3 deletions dogfooding/lib/screens/livestream_demo_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ class _LivestreamDemoScreenState extends State<LivestreamDemoScreen> {
_streamVideo = streamVideo;

result.fold(
success: (data) {
onSuccess: (_) {
_call = call;
if (mounted) {
setState(() {});
}
},
failure: (error) {
onFailure: (error, stackTrace) {
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text(error.toString())));
).showSnackBar(SnackBar(content: Text('$error')));
},
);
}
Expand Down
4 changes: 2 additions & 2 deletions dogfooding/lib/utils/feedback_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class __FeedbackRatingContentState extends State<_FeedbackRatingContent> {
);

result.fold(
success: (_) {
onSuccess: (_) {
hideFeedbackDialog(context);

ScaffoldMessenger.of(context).showSnackBar(
Expand All @@ -144,7 +144,7 @@ class __FeedbackRatingContentState extends State<_FeedbackRatingContent> {
),
);
},
failure: (error) {
onFailure: (error, stackTrace) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('Failed to submit feedback: $error'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ClosedCaptionsMenuItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
return StreamBuilder(
stream: widget.call.state.asStream(),
stream: widget.call.state,
builder: (context, snapshot) {
if (snapshot.hasData) {
final callState = snapshot.data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class _NoiseCancellationMenuItemState extends State<NoiseCancellationMenuItem> {
@override
Widget build(BuildContext context) {
return StreamBuilder(
stream: widget.call.state.asStream(),
stream: widget.call.state,
builder: (context, snapshot) {
if (snapshot.hasData) {
final callState = snapshot.data;
Expand Down
14 changes: 0 additions & 14 deletions dogfooding/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,6 @@ dependencies:
stream_video_push_notification: ^1.4.0
stream_video_screen_sharing: ^1.4.0

dependency_overrides:
stream_video:
path: ../packages/stream_video
stream_video_filters:
path: ../packages/stream_video_filters
stream_video_flutter:
path: ../packages/stream_video_flutter
stream_video_noise_cancellation:
path: ../packages/stream_video_noise_cancellation
stream_video_push_notification:
path: ../packages/stream_video_push_notification
stream_video_screen_sharing:
path: ../packages/stream_video_screen_sharing

dev_dependencies:
build_runner: ^2.4.6
envied_generator: ^1.2.1
Expand Down
4 changes: 4 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,7 @@ scripts:
npm install -g https://github.com/GetStream/stream-chat-docusaurus-cli &&
npx stream-chat-docusaurus -i -s
description: Runs the docusaurus documentation locally.

gen:api:
run: $MELOS_ROOT_PATH/packages/stream_video/scripts/generate.sh
description: Generate API client from OpenAPI spec.
22 changes: 22 additions & 0 deletions packages/stream_video/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## Unreleased

### ⚠️ Breaking

- Generated enum types no longer use the `Enum` suffix (e.g. `AudioSettingsRequestDefaultDeviceEnum` → `AudioSettingsRequestDefaultDevice`). The old names remain available as deprecated aliases and will be removed in a future release — please migrate to the new names.
- `custom` map fields now allow null values (`Map<String, Object?>`). Code that assumed non-null values may need null handling.
- `Result`, `Success`, and `Failure` are now provided by `stream_core`. Several API changes follow:
- `Result.fold()` now takes `{onSuccess:, onFailure:}` parameters instead of `{success:, failure:}`. Use the new `foldResult()` extension method to keep the previous `{success: (Success<T>), failure: (Failure)}` style.
- `Result.error(String)` constructor has been removed. Use the top-level `failureWithError('...')` function instead.
- `Result.failureWithCause(String, Object, [StackTrace?])` is no longer a named constructor — use the top-level `failureWithError(..., cause: ...)` function instead.
- `Failure.error` is now typed as `Object` instead of `VideoError`. Use the `.videoError` getter to obtain a typed `VideoError`.
- `StateEmitter`, `MutableStateEmitter`, `SharedEmitter`, and `MutableSharedEmitter` are now provided by `stream_core`. Several behavioural and API changes follow:
- `MutableStateEmitter` is **always seeded** — it requires an initial value and `.value` is always available. Use `.value` instead of `.valueOrNull` or `hasValue` checks.
- Equal consecutive values are **conflated** — setting the same value twice emits only once. Previously every assignment produced an event regardless of equality.
- `StateEmitter` and `SharedEmitter` now **implement `Stream` directly**. Use the emitter itself (e.g. `.listen()`, `.firstWhere()`) instead of `.asStream()` or `.valueStream`.
- `MutableStateEmitterImpl<T>` is now a typedef for `StateEmitterImpl<T>` from `stream_core`. Existing call sites continue to compile, but the concrete type has changed.
- `MutableSharedEmitterImpl<T>` is now a typedef for `MutableSharedEmitter<T>` from `stream_core`. Existing call sites continue to compile, but the concrete type has changed.
- `SharedEmitter.firstWhere` no longer accepts a `timeLimit` parameter — use `waitFor` with an optional `timeLimit`, or call `.firstWhere(...).timeout(...)`.
- `CurrentPlatform` and `PlatformType` are now provided by `stream_core`:
- `CurrentPlatform.name` has been removed — use `CurrentPlatform.operatingSystem` instead.
- `StreamLogger`, `Priority`, and `MessageBuilder` are now provided by `stream_core`. Import them from `stream_video` as before — the re-export is in place.

## 1.4.0

Each call now owns an isolated native `PeerConnectionFactory`. This fixes cross-call audio interference, sibling-call microphone capture loss, and noise cancellation failing to engage during lobby preview.
Expand Down
6 changes: 6 additions & 0 deletions packages/stream_video/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
targets:
$default:
builders:
json_serializable:
options:
field_rename: snake
Loading
Loading