@capgo/capacitor-stream-call 7.1.31 → 7.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,12 +2,16 @@
2
2
  <a href="https://capgo.app/"><img src='https://raw.githubusercontent.com/Cap-go/capgo/main/assets/capgo_banner.png' alt='Capgo - Instant updates for capacitor'/></a>
3
3
 
4
4
  <div align="center">
5
- <h2><a href="https://capgo.app/?ref=plugin"> ➡️ Get Instant updates for your App with Capgo</a></h2>
6
- <h2><a href="https://capgo.app/consulting/?ref=plugin"> Missing a feature? We’ll build the plugin for you 💪</a></h2>
5
+ <h2><a href="https://capgo.app/?ref=plugin_streamcall"> ➡️ Get Instant updates for your App with Capgo</a></h2>
6
+ <h2><a href="https://capgo.app/consulting/?ref=plugin_streamcall"> Missing a feature? We’ll build the plugin for you 💪</a></h2>
7
7
  </div>
8
8
 
9
9
  A Capacitor plugin that uses the [Stream Video SDK](https://getstream.io/) to enable video calling functionality in your app.
10
10
 
11
+ ## Documentation
12
+
13
+ The most complete doc is available here: https://capgo.app/docs/plugins/streamcall/
14
+
11
15
  ## Installation
12
16
 
13
17
  ```bash
@@ -240,21 +244,26 @@ export class CallService {
240
244
  * [`logout()`](#logout)
241
245
  * [`call(...)`](#call)
242
246
  * [`endCall()`](#endcall)
247
+ * [`joinCall(...)`](#joincall)
243
248
  * [`setMicrophoneEnabled(...)`](#setmicrophoneenabled)
244
249
  * [`setCameraEnabled(...)`](#setcameraenabled)
245
250
  * [`addListener('callEvent', ...)`](#addlistenercallevent-)
246
251
  * [`addListener('incomingCall', ...)`](#addlistenerincomingcall-)
247
252
  * [`removeAllListeners()`](#removealllisteners)
253
+ * [`enableBluetooth()`](#enablebluetooth)
248
254
  * [`acceptCall()`](#acceptcall)
249
255
  * [`rejectCall()`](#rejectcall)
250
256
  * [`isCameraEnabled()`](#iscameraenabled)
251
257
  * [`getCallStatus()`](#getcallstatus)
258
+ * [`getRingingCall()`](#getringingcall)
259
+ * [`toggleViews()`](#toggleviews)
252
260
  * [`setSpeaker(...)`](#setspeaker)
253
261
  * [`switchCamera(...)`](#switchcamera)
254
262
  * [`getCallInfo(...)`](#getcallinfo)
255
263
  * [`setDynamicStreamVideoApikey(...)`](#setdynamicstreamvideoapikey)
256
264
  * [`getDynamicStreamVideoApikey()`](#getdynamicstreamvideoapikey)
257
265
  * [`getCurrentUser()`](#getcurrentuser)
266
+ * [`getPluginVersion()`](#getpluginversion)
258
267
  * [Interfaces](#interfaces)
259
268
  * [Type Aliases](#type-aliases)
260
269
  * [Enums](#enums)
@@ -324,6 +333,23 @@ End the current call
324
333
  --------------------
325
334
 
326
335
 
336
+ ### joinCall(...)
337
+
338
+ ```typescript
339
+ joinCall(options: { callId: string; callType: string; }) => Promise<SuccessResponse>
340
+ ```
341
+
342
+ Join an existing call
343
+
344
+ | Param | Type | Description |
345
+ | ------------- | -------------------------------------------------- | ------------------ |
346
+ | **`options`** | <code>{ callId: string; callType: string; }</code> | - Microphone state |
347
+
348
+ **Returns:** <code>Promise&lt;<a href="#successresponse">SuccessResponse</a>&gt;</code>
349
+
350
+ --------------------
351
+
352
+
327
353
  ### setMicrophoneEnabled(...)
328
354
 
329
355
  ```typescript
@@ -406,6 +432,19 @@ Remove all event listeners
406
432
  --------------------
407
433
 
408
434
 
435
+ ### enableBluetooth()
436
+
437
+ ```typescript
438
+ enableBluetooth() => Promise<SuccessResponse>
439
+ ```
440
+
441
+ Enable bluetooth audio
442
+
443
+ **Returns:** <code>Promise&lt;<a href="#successresponse">SuccessResponse</a>&gt;</code>
444
+
445
+ --------------------
446
+
447
+
409
448
  ### acceptCall()
410
449
 
411
450
  ```typescript
@@ -458,6 +497,32 @@ Get the current call status
458
497
  --------------------
459
498
 
460
499
 
500
+ ### getRingingCall()
501
+
502
+ ```typescript
503
+ getRingingCall() => Promise<CallEvent>
504
+ ```
505
+
506
+ Get the current ringing call
507
+
508
+ **Returns:** <code>Promise&lt;<a href="#callevent">CallEvent</a>&gt;</code>
509
+
510
+ --------------------
511
+
512
+
513
+ ### toggleViews()
514
+
515
+ ```typescript
516
+ toggleViews() => Promise<{ newLayout: StreamCallLayout; }>
517
+ ```
518
+
519
+ Cycle through the available video layouts
520
+
521
+ **Returns:** <code>Promise&lt;{ newLayout: <a href="#streamcalllayout">StreamCallLayout</a>; }&gt;</code>
522
+
523
+ --------------------
524
+
525
+
461
526
  ### setSpeaker(...)
462
527
 
463
528
  ```typescript
@@ -552,6 +617,19 @@ Get the current user's information
552
617
  --------------------
553
618
 
554
619
 
620
+ ### getPluginVersion()
621
+
622
+ ```typescript
623
+ getPluginVersion() => Promise<{ version: string; }>
624
+ ```
625
+
626
+ Get the native Capacitor plugin version
627
+
628
+ **Returns:** <code>Promise&lt;{ version: string; }&gt;</code>
629
+
630
+ --------------------
631
+
632
+
555
633
  ### Interfaces
556
634
 
557
635
 
@@ -560,6 +638,7 @@ Get the current user's information
560
638
  | Prop | Type | Description |
561
639
  | ------------- | -------------------- | ------------------------------------ |
562
640
  | **`success`** | <code>boolean</code> | Whether the operation was successful |
641
+ | **`callId`** | <code>string</code> | |
563
642
 
564
643
 
565
644
  #### LoginOptions
@@ -597,14 +676,16 @@ Get the current user's information
597
676
 
598
677
  #### CallEvent
599
678
 
600
- | Prop | Type | Description |
601
- | ------------- | ------------------------------------------------- | -------------------------------------------------------------- |
602
- | **`callId`** | <code>string</code> | ID of the call |
603
- | **`state`** | <code><a href="#callstate">CallState</a></code> | Current state of the call |
604
- | **`userId`** | <code>string</code> | User ID of the participant in the call who triggered the event |
605
- | **`reason`** | <code>string</code> | Reason for the call state change, if applicable |
606
- | **`caller`** | <code><a href="#callmember">CallMember</a></code> | Information about the caller (for incoming calls) |
607
- | **`members`** | <code>CallMember[]</code> | List of call members |
679
+ | Prop | Type | Description |
680
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
681
+ | **`callId`** | <code>string</code> | ID of the call |
682
+ | **`state`** | <code><a href="#callstate">CallState</a></code> | Current state of the call |
683
+ | **`userId`** | <code>string</code> | User ID of the participant in the call who triggered the event |
684
+ | **`reason`** | <code>string</code> | Reason for the call state change, if applicable |
685
+ | **`caller`** | <code><a href="#callmember">CallMember</a></code> | Information about the caller (for incoming calls) |
686
+ | **`members`** | <code>CallMember[]</code> | List of call members |
687
+ | **`custom`** | <code><a href="#record">Record</a>&lt; string, \| string \| boolean \| number \| null \| <a href="#record">Record</a>&lt;string, string \| boolean \| number \| null&gt; \| string[] \| boolean[] \| number[] &gt;</code> | |
688
+ | **`count`** | <code>number</code> | |
608
689
 
609
690
 
610
691
  #### CallState
@@ -817,6 +898,10 @@ The JSON representation for <a href="#listvalue">`ListValue`</a> is JSON array.
817
898
  | **`caller`** | <code><a href="#callmember">CallMember</a></code> | Information about the caller |
818
899
  | **`custom`** | <code><a href="#record">Record</a>&lt; string, \| string \| boolean \| number \| null \| <a href="#record">Record</a>&lt;string, string \| boolean \| number \| null&gt; \| string[] \| boolean[] \| number[] &gt;</code> | Custom data to be passed to the call |
819
900
 
901
+ | Method | Signature | Description |
902
+ | -------------------- | -------------------------------------------- | --------------------------------------- |
903
+ | **getPluginVersion** | () =&gt; Promise&lt;{ version: string; }&gt; | Get the native Capacitor plugin version |
904
+
820
905
 
821
906
  #### CameraEnabledResponse
822
907
 
@@ -848,7 +933,7 @@ The JSON representation for <a href="#listvalue">`ListValue`</a> is JSON array.
848
933
 
849
934
  #### CallType
850
935
 
851
- <code>'default' | 'audio_room' | 'livestream' | 'development'</code>
936
+ <code>'default' | 'audio' | 'audio_room' | 'livestream' | 'development'</code>
852
937
 
853
938
 
854
939
  #### Record
@@ -860,7 +945,12 @@ Construct a type with a set of properties K of type T
860
945
 
861
946
  #### CallState
862
947
 
863
- <code>'idle' | 'ringing' | 'joining' | 'reconnecting' | 'joined' | 'leaving' | 'left' | 'created' | 'session_started' | 'rejected' | 'missed' | 'accepted' | 'ended' | 'camera_enabled' | 'camera_disabled' | 'microphone_enabled' | 'microphone_disabled' | 'unknown'</code>
948
+ <code>'idle' | 'ringing' | 'joining' | 'reconnecting' | 'joined' | 'leaving' | 'left' | 'created' | 'session_started' | 'rejected' | 'participant_counts' | 'missed' | 'accepted' | 'ended' | 'camera_enabled' | 'camera_disabled' | 'speaker_enabled' | 'speaker_disabled' | 'microphone_enabled' | 'microphone_disabled' | 'outgoing_call_ended' | 'unknown'</code>
949
+
950
+
951
+ #### StreamCallLayout
952
+
953
+ <code>'grid' | 'spotlight' | 'dynamic' | 'fullScreen' | 'fullscreen'</code>
864
954
 
865
955
 
866
956
  ### Enums
@@ -77,8 +77,8 @@ dependencies {
77
77
 
78
78
 
79
79
  // Stream dependencies
80
- implementation("io.getstream:stream-video-android-ui-compose:1.14.0")
81
- implementation("io.getstream:stream-video-android-core:1.14.0")
80
+ implementation("io.getstream:stream-video-android-ui-compose:1.16.0")
81
+ implementation("io.getstream:stream-video-android-core:1.16.0")
82
82
  implementation("io.getstream:stream-android-push:1.3.2")
83
83
  implementation("io.getstream:stream-android-push-firebase:1.3.2")
84
84
 
@@ -1,5 +1,4 @@
1
1
  <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
- <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
3
2
  <application>
4
3
 
5
4
  <service
@@ -14,11 +13,6 @@
14
13
  </intent-filter>
15
14
  </service>
16
15
 
17
- <service
18
- android:name="ee.forgr.capacitor.streamcall.StreamCallBackgroundService"
19
- android:enabled="true"
20
- android:exported="false" />
21
-
22
16
  <receiver
23
17
  android:name=".AcceptCallReceiver"
24
18
  android:enabled="true"
@@ -24,7 +24,7 @@ class AcceptCallReceiver : BroadcastReceiver() {
24
24
  if (launchIntent != null) {
25
25
  launchIntent.action = NotificationHandler.ACTION_ACCEPT_CALL
26
26
  launchIntent.putExtra(NotificationHandler.INTENT_EXTRA_CALL_CID, cid)
27
- launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
27
+ launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
28
28
  context.startActivity(launchIntent)
29
29
  Log.d("AcceptCallReceiver", "Started MainActivity to handle ACCEPT_CALL action.")
30
30
  } else {
@@ -18,7 +18,7 @@ class CustomStreamIntentResolver(private val context: Application) : StreamInten
18
18
  flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_SINGLE_TOP
19
19
  putExtra(NotificationHandler.INTENT_EXTRA_CALL_CID, callId)
20
20
  action = "io.getstream.video.android.action.INCOMING_CALL"
21
-
21
+
22
22
  } ?: Intent(Intent.ACTION_MAIN).apply {
23
23
  setPackage(context.packageName)
24
24
  addCategory(Intent.CATEGORY_LAUNCHER)
@@ -162,4 +162,4 @@ class CustomStreamIntentResolver(private val context: Application) : StreamInten
162
162
  putExtra(NotificationHandler.INTENT_EXTRA_NOTIFICATION_ID, NotificationHandler.INCOMING_CALL_NOTIFICATION_ID)
163
163
  }
164
164
  }
165
- }
165
+ }