Skip to content
Open
Show file tree
Hide file tree
Changes from 26 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
15 changes: 8 additions & 7 deletions .github/actions/pana/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ inputs:
runs:
using: "composite"
steps:
- name: Temporary Override Local Dependencies
uses: mikefarah/yq@master
with:
cmd: |
yq eval '.dependencies.stream_video = {"path": "../stream_video"}' -i packages/stream_video_flutter/pubspec.yaml
yq eval '.dependencies.stream_video = {"path": "../stream_video"}' -i packages/stream_video_push_notification/pubspec.yaml
yq eval '.dependencies.stream_video = {"path": "../stream_video"}' -i packages/stream_video_noise_cancellation/pubspec.yaml
# - name: Temporary Override Local Dependencies
# uses: mikefarah/yq@master
# with:
# cmd: |
# yq eval '.dependencies.stream_video = {"path": "../stream_video"}' -i packages/stream_video_flutter/pubspec.yaml
# yq eval '.dependencies.stream_video = {"path": "../stream_video"}' -i packages/stream_video_push_notification/pubspec.yaml
# yq eval '.dependencies.stream_video = {"path": "../stream_video"}' -i packages/stream_video_noise_cancellation/pubspec.yaml
# yq eval '.dependencies.stream_video_flutter = {"path": "../stream_video_flutter"}' -i packages/stream_video_noise_cancellation/pubspec.yaml

- name: Install Flutter
uses: subosito/flutter-action@v2
Expand Down
2 changes: 0 additions & 2 deletions dogfooding/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
-keep class io.flutter.view.** { *; }
-keep class io.flutter.plugins.** { *; }

-keep class com.hiennv.flutter_callkit_incoming.** { *; }

-keep class java.beans.Transient.** {*;}
-keep class java.beans.ConstructorProperties.** {*;}
-keep class java.nio.file.Path.** {*;}
Expand Down
Binary file added dogfooding/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions dogfooding/lib/app/app_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class _StreamDogFoodingAppContentState
if (!locator.isRegistered<StreamVideo>()) return;

// Observe call kit events.
_observeCallKitEvents();
_observeRingingEvents();
// Observes deep links.
_observeDeepLinks();
// Observe FCM messages.
Expand Down Expand Up @@ -114,15 +114,15 @@ class _StreamDogFoodingAppContentState
}
}

void _observeCallKitEvents() {
void _observeRingingEvents() {
final streamVideo = locator.get<StreamVideo>();

// On mobile we depend on call kit notifications.
// On desktop and web they are (currently) not available, so we depend on a
// websocket which can receive a call when the app is open.
if (CurrentPlatform.isMobile) {
_compositeSubscription.add(
streamVideo.observeCoreCallKitEvents(
streamVideo.observeCoreRingingEvents(
onCallAccepted: (callToJoin) {
// Navigate to the call screen.
final extra = (
Expand Down
2 changes: 1 addition & 1 deletion dogfooding/lib/app/firebase_messaging_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Future<void> firebaseMessagingBackgroundHandler(RemoteMessage message) async {
prefs.environment,
);

final subscription = streamVideo.observeCallDeclinedCallKitEvent();
final subscription = streamVideo.observeCallDeclinedRingingEvent();

streamVideo.disposeAfterResolvingRinging(
disposingCallback: () {
Expand Down
7 changes: 3 additions & 4 deletions dogfooding/lib/di/injector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import '../core/repos/token_service.dart';
import '../core/repos/user_auth_repository.dart';
import '../core/repos/user_chat_repository.dart';
import '../log_config.dart';
import '../utils/consts.dart';

GetIt locator = GetIt.instance;

Expand Down Expand Up @@ -167,9 +166,9 @@ StreamVideo _initStreamVideo(
androidPushProvider: const StreamVideoPushProvider.firebase(
name: 'flutter-firebase',
),
pushParams: const StreamVideoPushParams(
appName: kAppName,
ios: IOSParams(iconName: 'IconMask'),
pushConfiguration: const StreamVideoPushConfiguration(
ios: IOSPushConfiguration(iconName: 'IconMask'),
android: AndroidPushConfiguration(defaultAvatar: 'assets/logo.png'),
),
registerApnDeviceToken: true,
),
Expand Down
11 changes: 11 additions & 0 deletions packages/stream_video/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
## Unreleased

🚧 Breaking changes

### API renames and type changes

- `onCallKitEvent``onRingingEvent`
- `observeCoreCallKitEvents``observeCoreRingingEvents`
- `observeCallAcceptCallKitEvent``observeCallAcceptRingingEvent`
- `observeCallDeclinedCallKitEvent``observeCallDeclinedRingingEvent`
- `observeCallEndedCallKitEvent``observeCallEndedRingingEvent`
- `CallKitEvent` (type) → `RingingEvent`

🔄 Changed
- The `byParticipantSource` participant sorting now accepts a list of sources. The default sorting for `speaker` and `livestream` presets now include other ingress sources.

Expand Down
86 changes: 86 additions & 0 deletions packages/stream_video/lib/fix_data.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Docs on data driven fixes: https://github.com/flutter/flutter/blob/master/docs/contributing/Data-driven-Fixes.md

version: 1
transforms:
- title: "replace CallKitEvent with RingingEvent"
date: "2025-08-28"
element:
uris:
[
"package:stream_video/src/push_notification/push_notification_manager.dart",
"package:stream_video/stream_video.dart",
]
typedef: "CallKitEvent"
changes:
- kind: "rename"
newName: "RingingEvent"

- title: "replace observeCallDeclinedCallKitEvent with observeCallDeclinedRingingEvent"
date: "2025-08-28"
element:
uris:
[
"package:stream_video/src/stream_video.dart",
"package:stream_video/stream_video.dart",
]
inClass: "StreamVideo"
method: "observeCallDeclinedCallKitEvent"
changes:
- kind: "rename"
newName: "observeCallDeclinedRingingEvent"

- title: "replace onCallKitEvent with onRingingEvent"
date: "2025-08-28"
element:
uris:
[
"package:stream_video/src/stream_video.dart",
"package:stream_video/stream_video.dart",
]
inClass: "StreamVideo"
method: "onCallKitEvent"
changes:
- kind: "rename"
newName: "onRingingEvent"

- title: "replace observeCoreCallKitEvents with observeCoreRingingEvents"
date: "2025-08-28"
element:
uris:
[
"package:stream_video/src/stream_video.dart",
"package:stream_video/stream_video.dart",
]
inClass: "StreamVideo"
method: "observeCoreCallKitEvents"
changes:
- kind: "rename"
newName: "observeCoreRingingEvents"

- title: "replace observeCallAcceptCallKitEvent with observeCallAcceptRingingEvent"
date: "2025-08-28"
element:
uris:
[
"package:stream_video/src/stream_video.dart",
"package:stream_video/stream_video.dart",
]
inClass: "StreamVideo"
method: "observeCallAcceptCallKitEvent"
changes:
- kind: "rename"
newName: "observeCallAcceptRingingEvent"

- title: "replace observeCallEndedCallKitEvent with observeCallEndedRingingEvent"
date: "2025-08-28"
element:
uris:
[
"package:stream_video/src/stream_video.dart",
"package:stream_video/stream_video.dart",
]
inClass: "StreamVideo"
method: "observeCallEndedCallKitEvent"
changes:
- kind: "rename"
newName: "observeCallEndedRingingEvent"
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
part of 'push_notification_manager.dart';

/// Represents an event related to the CallKit.
@Deprecated('Use RingingEvent instead.')
typedef CallKitEvent = RingingEvent;

/// Represents an event related to the Ringing flow.
///
/// Instances of this class are used to signify different call events that can be
/// received from [PushNotificationManager].
sealed class CallKitEvent with EquatableMixin {
const CallKitEvent();
sealed class RingingEvent with EquatableMixin {
const RingingEvent();

@override
bool? get stringify => true;
}

/// Event for updating the VoIP push token on the device (iOS specific).
class ActionDidUpdateDevicePushTokenVoip extends CallKitEvent {
class ActionDidUpdateDevicePushTokenVoip extends RingingEvent {
/// Creates an [ActionDidUpdateDevicePushTokenVoip] event instance with the
/// specified [token].
const ActionDidUpdateDevicePushTokenVoip({required this.token});
Expand All @@ -27,7 +30,7 @@ class ActionDidUpdateDevicePushTokenVoip extends CallKitEvent {
/// Represents an incoming call event.
///
/// This event is triggered when a incoming call is received.
class ActionCallIncoming extends CallKitEvent {
class ActionCallIncoming extends RingingEvent {
/// Creates an [ActionCallIncoming] event instance with the specified [data].
const ActionCallIncoming({required this.data});

Expand All @@ -41,7 +44,7 @@ class ActionCallIncoming extends CallKitEvent {
/// Represents a call start event.
///
/// This event is triggered when a outgoing call is started.
class ActionCallStart extends CallKitEvent {
class ActionCallStart extends RingingEvent {
/// Creates an [ActionCallStart] event instance with the specified [data].
const ActionCallStart({required this.data});

Expand All @@ -57,7 +60,7 @@ class ActionCallStart extends CallKitEvent {
/// This event is triggered when a incoming call is accepted. This can happen
/// when a user clicks on the "Accept" action from a incoming call
/// notification.
class ActionCallAccept extends CallKitEvent {
class ActionCallAccept extends RingingEvent {
/// Creates an [ActionCallAccept] event instance with the specified [data].
const ActionCallAccept({required this.data});

Expand All @@ -73,7 +76,7 @@ class ActionCallAccept extends CallKitEvent {
/// This event is triggered when a incoming call is declined. This can happen
/// when a user clicks on the "Decline" action from a incoming call
/// notification.
class ActionCallDecline extends CallKitEvent {
class ActionCallDecline extends RingingEvent {
/// Creates an [ActionCallDecline] event instance with the specified [data].
const ActionCallDecline({required this.data});

Expand All @@ -88,7 +91,7 @@ class ActionCallDecline extends CallKitEvent {
///
/// This event is triggered when a incoming or outgoing call is ended. This can
/// happen when a user clicks on the "End" action from the notification.
class ActionCallEnded extends CallKitEvent {
class ActionCallEnded extends RingingEvent {
/// Creates an [ActionCallEnded] event instance with the specified [data].
const ActionCallEnded({required this.data});

Expand All @@ -103,7 +106,7 @@ class ActionCallEnded extends CallKitEvent {
///
/// This event is triggered when a call times out. This can happen when a user
/// doesn't answer a incoming call within a certain time frame.
class ActionCallTimeout extends CallKitEvent {
class ActionCallTimeout extends RingingEvent {
/// Creates an [ActionCallTimeout] event instance with the specified [data].
const ActionCallTimeout({required this.data});

Expand All @@ -120,7 +123,7 @@ class ActionCallTimeout extends CallKitEvent {
/// user clicks on the "Call back" action from a missed call notification.
///
/// Note: This event is only available on Android.
class ActionCallCallback extends CallKitEvent {
class ActionCallCallback extends RingingEvent {
/// Creates an [ActionCallCallback] event instance with the specified [data].
const ActionCallCallback({required this.data});

Expand All @@ -131,7 +134,7 @@ class ActionCallCallback extends CallKitEvent {
List<Object?> get props => [data];
}

class ActionCallConnected extends CallKitEvent {
class ActionCallConnected extends RingingEvent {
/// Creates an [ActionCallConnected] event instance with the specified [data].
const ActionCallConnected({required this.data});

Expand All @@ -145,7 +148,7 @@ class ActionCallConnected extends CallKitEvent {
/// Represents a call toggle hold event.
///
/// Note: This event is only available on iOS.
class ActionCallToggleHold extends CallKitEvent {
class ActionCallToggleHold extends RingingEvent {
/// Creates an [ActionCallToggleHold] event instance with the specified [uuid]
/// and [isOnHold] flag.
const ActionCallToggleHold({
Expand All @@ -166,7 +169,7 @@ class ActionCallToggleHold extends CallKitEvent {
/// Represents a call toggle mute event.
///
/// Note: This event is only available on iOS.
class ActionCallToggleMute extends CallKitEvent {
class ActionCallToggleMute extends RingingEvent {
/// Creates an [ActionCallToggleMute] event instance with the specified [uuid]
/// and [isMuted] flag.
const ActionCallToggleMute({
Expand All @@ -184,13 +187,13 @@ class ActionCallToggleMute extends CallKitEvent {
List<Object?> get props => [uuid, isMuted];
}

/// Represents a call toggle DMTF event.
/// Represents a call toggle DTMF event.
///
/// Note: This event is only available on iOS.
class ActionCallToggleDmtf extends CallKitEvent {
/// Creates an [ActionCallToggleDmtf] event instance with the specified [uuid]
class ActionCallToggleDtmf extends RingingEvent {
/// Creates an [ActionCallToggleDtmf] event instance with the specified [uuid]
/// and [digits].
const ActionCallToggleDmtf({
const ActionCallToggleDtmf({
required this.uuid,
required this.digits,
});
Expand All @@ -208,7 +211,7 @@ class ActionCallToggleDmtf extends CallKitEvent {
/// Represents a call toggle group event.
///
/// Note: This event is only available on iOS.
class ActionCallToggleGroup extends CallKitEvent {
class ActionCallToggleGroup extends RingingEvent {
/// Creates an [ActionCallToggleGroup] event instance with the specified
/// [uuid] and [callUUIDToGroupWith].
const ActionCallToggleGroup({
Expand All @@ -229,20 +232,20 @@ class ActionCallToggleGroup extends CallKitEvent {
/// Represents a call toggle audio session event.
///
/// Note: This event is only available on iOS.
class ActionCallToggleAudioSession extends CallKitEvent {
class ActionCallToggleAudioSession extends RingingEvent {
/// Creates an [ActionCallToggleAudioSession] event instance with the
/// specified [isActivate] flag.
const ActionCallToggleAudioSession({required this.isActivate});
/// specified [isActive] flag.
const ActionCallToggleAudioSession({required this.isActive});

/// Indicates whether the audio session is active.
final bool isActivate;
final bool isActive;

@override
List<Object?> get props => [isActivate];
List<Object?> get props => [isActive];
}

/// Represents a custom call event.
class ActionCallCustom extends CallKitEvent {
class ActionCallCustom extends RingingEvent {
/// Creates an [ActionCallCustom] event instance with the specified [body].
const ActionCallCustom(this.body);

Expand All @@ -265,7 +268,7 @@ class CallData with EquatableMixin {
this.callCid,
this.avatar,
this.handle,
this.nameCaller,
this.callerName,
this.hasVideo,
this.extraData,
});
Expand All @@ -283,7 +286,7 @@ class CallData with EquatableMixin {
final String? handle;

/// Name of the caller.
final String? nameCaller;
final String? callerName;

/// Indicates whether the call has video.
final bool? hasVideo;
Expand All @@ -300,7 +303,7 @@ class CallData with EquatableMixin {
callCid,
avatar,
handle,
nameCaller,
callerName,
hasVideo,
extraData,
];
Expand Down
Loading
Loading