@capgo/capacitor-stream-call 0.0.68 → 0.0.69

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.
@@ -52,6 +52,7 @@ import io.getstream.android.video.generated.models.CallMissedEvent
52
52
  import io.getstream.android.video.generated.models.CallRejectedEvent
53
53
  import io.getstream.android.video.generated.models.CallRingEvent
54
54
  import io.getstream.android.video.generated.models.CallSessionEndedEvent
55
+ import io.getstream.android.video.generated.models.CallSessionParticipantCountsUpdatedEvent
55
56
  import io.getstream.android.video.generated.models.CallSessionParticipantLeftEvent
56
57
  import io.getstream.android.video.generated.models.CallSessionStartedEvent
57
58
  import io.getstream.android.video.generated.models.VideoEvent
@@ -823,7 +824,7 @@ public class StreamCallPlugin : Plugin() {
823
824
  updateCallStatusAndNotify(event.callCid, "left")
824
825
  }
825
826
 
826
- is ParticipantLeftEvent, is CallSessionParticipantLeftEvent -> {
827
+ is ParticipantLeftEvent, is CallSessionParticipantLeftEvent, is CallSessionParticipantCountsUpdatedEvent -> {
827
828
  val activeCall = streamVideoClient?.state?.activeCall?.value
828
829
 
829
830
  val callId = when (event) {
@@ -833,6 +834,9 @@ public class StreamCallPlugin : Plugin() {
833
834
  is CallSessionParticipantLeftEvent -> {
834
835
  event.callCid
835
836
  }
837
+ is CallSessionParticipantCountsUpdatedEvent -> {
838
+ event.callCid
839
+ }
836
840
 
837
841
  else -> {
838
842
  throw RuntimeException("Unreachable code reached when getting callId")
@@ -844,7 +848,7 @@ public class StreamCallPlugin : Plugin() {
844
848
 
845
849
  if (activeCall != null && activeCall.cid == callId) {
846
850
  val connectionState = activeCall.state.connection.value
847
- if (connectionState == RealtimeConnection.Disconnected) {
851
+ if (connectionState != RealtimeConnection.Disconnected) {
848
852
  val total = activeCall.state.participantCounts.value?.total
849
853
  android.util.Log.d("StreamCallPlugin", "CallSessionParticipantLeftEvent: Participant left, remaining: $total");
850
854
  if (total != null && total <= 2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-stream-call",
3
- "version": "0.0.68",
3
+ "version": "0.0.69",
4
4
  "description": "Uses the https://getstream.io/ SDK to implement calling in Capacitor",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",