@capgo/capacitor-stream-call 7.7.10 → 7.7.12

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.
@@ -78,7 +78,9 @@ import androidx.compose.runtime.mutableStateOf
78
78
  import androidx.compose.runtime.remember
79
79
  import androidx.compose.runtime.setValue
80
80
  import io.getstream.video.android.core.sounds.RingingConfig
81
- import io.getstream.video.android.core.sounds.toSounds
81
+ import io.getstream.video.android.core.sounds.MutedRingingConfig
82
+ import io.getstream.video.android.core.sounds.Sounds
83
+ import io.getstream.video.android.core.sounds.ringingConfig
82
84
  import io.getstream.video.android.core.sounds.enableRingingCallVibrationConfig
83
85
  import io.getstream.video.android.model.Device
84
86
  import io.getstream.video.android.model.User
@@ -163,11 +165,20 @@ class StreamCallPlugin : Plugin() {
163
165
  INITIALIZED
164
166
  }
165
167
 
166
- fun incomingOnlyRingingConfig(packageName: String): RingingConfig = object : RingingConfig {
168
+ fun incomingOnlyRingingConfig(packageName: String): Sounds {
167
169
  val ringtoneUri = "android.resource://${packageName}/raw/outgoing".toUri()
168
-
169
- override val incomingCallSoundUri: Uri? = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE)
170
- override val outgoingCallSoundUri: Uri? = ringtoneUri
170
+
171
+ val config = object : RingingConfig {
172
+ override val incomingCallSoundUri: Uri? = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE)
173
+ override val outgoingCallSoundUri: Uri? = ringtoneUri
174
+ }
175
+
176
+ val mutedConfig = object : MutedRingingConfig {
177
+ override val playIncomingSoundIfMuted: Boolean = false
178
+ override val playOutgoingSoundIfMuted: Boolean = true
179
+ }
180
+
181
+ return ringingConfig(config, mutedConfig)
171
182
  }
172
183
 
173
184
  private fun runOnMainThread(action: () -> Unit) {
@@ -865,7 +876,7 @@ class StreamCallPlugin : Plugin() {
865
876
  user = savedCredentials.user,
866
877
  token = savedCredentials.tokenValue,
867
878
  notificationConfig = notificationConfig,
868
- sounds = soundsConfig.toSounds(),
879
+ sounds = soundsConfig,
869
880
  loggingLevel = LoggingLevel(priority = Priority.INFO),
870
881
  vibrationConfig = enableRingingCallVibrationConfig()
871
882
  ).build()
@@ -12,7 +12,7 @@ import WebKit
12
12
  */
13
13
  @objc(StreamCallPlugin)
14
14
  public class StreamCallPlugin: CAPPlugin, CAPBridgedPlugin {
15
- private let pluginVersion: String = "7.7.10"
15
+ private let pluginVersion: String = "7.7.12"
16
16
  public let identifier = "StreamCallPlugin"
17
17
  public let jsName = "StreamCall"
18
18
  public let pluginMethods: [CAPPluginMethod] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-stream-call",
3
- "version": "7.7.10",
3
+ "version": "7.7.12",
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",