Skip to content

Commit 421f2ac

Browse files
d3xvnBrazol
andauthored
fix: CallKit now displays appropriate video and audio call labels. (#709)
* CallKit now displays appropriate video and audio call labels. * support for Android --------- Co-authored-by: Brazol <[email protected]> Co-authored-by: Maciej Brażewicz <[email protected]>
1 parent f389e26 commit 421f2ac

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

packages/stream_video/lib/src/stream_video.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ class StreamVideo extends Disposable {
612612

613613
final createdById = payload['created_by_id'] as String?;
614614
final createdByName = payload['created_by_display_name'] as String?;
615+
final hasVideo = payload['video'] as String?;
615616

616617
final type = payload['type'] as String?;
617618
if (type == 'call.missed') {
@@ -644,6 +645,7 @@ class StreamVideo extends Disposable {
644645
handle: createdById,
645646
nameCaller: createdByName,
646647
callCid: callCid,
648+
hasVideo: hasVideo != 'false',
647649
),
648650
);
649651
return true;

packages/stream_video_flutter/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Upcoming
2+
3+
✅ Added
4+
5+
- CallKit now displays appropriate video and audio call labels.
6+
17
## 0.4.2
28

39
✅ Added

packages/stream_video_push_notification/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Upcoming
2+
3+
✅ Added
4+
5+
- CallKit now displays appropriate video and audio call labels.
6+
17
## 0.4.2
28
* Sync version with `stream_video_flutter` 0.4.2
39

packages/stream_video_push_notification/ios/Classes/StreamVideoPKDelegateManager.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ public class StreamVideoPKDelegateManager: NSObject, PKPushRegistryDelegate, UNU
105105
let callCid = streamDict?["call_cid"] as? String ?? ""
106106
let createdByName = streamDict?["created_by_display_name"] as? String
107107
let createdById = streamDict?["created_by_id"] as? String
108+
let videoIncluded = streamDict?["video"] as? String
109+
let videoData = videoIncluded == "false" ? 0 : 1
108110

109111
var callUUID = UUID().uuidString;
110112

@@ -118,7 +120,7 @@ public class StreamVideoPKDelegateManager: NSObject, PKPushRegistryDelegate, UNU
118120
data.callKitData.uuid = callUUID
119121
data.callKitData.nameCaller = createdByName ?? defaultCallText
120122
data.callKitData.handle = createdById ?? defaultCallText
121-
data.callKitData.type = 1 //video
123+
data.callKitData.type = videoData
122124
data.callKitData.extra = ["callCid": callCid]
123125

124126
// Show call incoming notification.

0 commit comments

Comments
 (0)