@capgo/capacitor-stream-call 0.0.81 → 0.0.83
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/android/src/main/java/ee/forgr/capacitor/streamcall/CustomNotificationHandler.kt +2 -2
- package/android/src/main/java/ee/forgr/capacitor/streamcall/StreamCallFragment.kt +8 -36
- package/android/src/main/java/ee/forgr/capacitor/streamcall/StreamCallPlugin.kt +290 -308
- package/android/src/main/java/ee/forgr/capacitor/streamcall/TouchInterceptWrapper.kt +5 -3
- package/android/src/main/java/ee/forgr/capacitor/streamcall/UserRepository.kt +4 -5
- package/ios/Sources/StreamCallPlugin/StreamCallPlugin.swift +0 -4
- package/package.json +1 -1
- package/android/src/main/java/ee/forgr/capacitor/streamcall/RingtonePlayer.kt +0 -162
|
@@ -28,7 +28,7 @@ class CustomNotificationHandler(
|
|
|
28
28
|
private const val PREFS_NAME = "StreamCallPrefs"
|
|
29
29
|
private const val KEY_NOTIFICATION_TIME = "notification_creation_time"
|
|
30
30
|
}
|
|
31
|
-
private var allowSound = true
|
|
31
|
+
private var allowSound = true
|
|
32
32
|
|
|
33
33
|
override fun getRingingCallNotification(
|
|
34
34
|
ringingState: RingingState,
|
|
@@ -315,7 +315,7 @@ class CustomNotificationHandler(
|
|
|
315
315
|
)
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
|
|
318
|
+
fun clone(): CustomNotificationHandler {
|
|
319
319
|
Log.d("CustomNotificationHandler", "clone called")
|
|
320
320
|
return CustomNotificationHandler(this.application, this.endCall, this.incomingCall)
|
|
321
321
|
}
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
package ee.forgr.capacitor.streamcall
|
|
1
|
+
package ee.forgr.capacitor.streamcall
|
|
2
2
|
|
|
3
|
-
import android.os.Bundle
|
|
4
|
-
import android.view.LayoutInflater
|
|
5
|
-
import android.view.View
|
|
6
|
-
import android.view.ViewGroup
|
|
7
|
-
import androidx.fragment.app.Fragment
|
|
8
|
-
import io.getstream.video.android.core.Call
|
|
9
|
-
import
|
|
10
|
-
import kotlinx.coroutines.Dispatchers;
|
|
11
|
-
import kotlinx.coroutines.flow.launchIn;
|
|
12
|
-
import kotlinx.coroutines.flow.onEach;
|
|
13
|
-
import kotlinx.coroutines.launch;
|
|
14
|
-
import io.getstream.webrtc.android.ui.VideoTextureViewRenderer;
|
|
15
|
-
import stream.video.sfu.models.TrackType;
|
|
3
|
+
import android.os.Bundle
|
|
4
|
+
import android.view.LayoutInflater
|
|
5
|
+
import android.view.View
|
|
6
|
+
import android.view.ViewGroup
|
|
7
|
+
import androidx.fragment.app.Fragment
|
|
8
|
+
import io.getstream.video.android.core.Call
|
|
9
|
+
import io.getstream.webrtc.android.ui.VideoTextureViewRenderer
|
|
16
10
|
|
|
17
11
|
class StreamCallFragment : Fragment() {
|
|
18
12
|
private var call: Call? = null
|
|
@@ -23,28 +17,6 @@ class StreamCallFragment : Fragment() {
|
|
|
23
17
|
return videoRenderer!!
|
|
24
18
|
}
|
|
25
19
|
|
|
26
|
-
fun setCall(call: Call) {
|
|
27
|
-
this.call = call
|
|
28
|
-
videoRenderer?.let { renderer ->
|
|
29
|
-
// Setup video rendering for local video
|
|
30
|
-
call.initRenderer(renderer, call.sessionId, TrackType.TRACK_TYPE_VIDEO)
|
|
31
|
-
// Setup listener for remote participants' video
|
|
32
|
-
val scope = CoroutineScope(Dispatchers.Main)
|
|
33
|
-
scope.launch {
|
|
34
|
-
call.state.participants.onEach { participantStates ->
|
|
35
|
-
participantStates.forEach { participantState ->
|
|
36
|
-
participantState.videoTrack.onEach { videoTrack ->
|
|
37
|
-
videoTrack?.let { track ->
|
|
38
|
-
// Additional renderers might be needed for multiple participants
|
|
39
|
-
track.video.addSink(renderer)
|
|
40
|
-
}
|
|
41
|
-
}.launchIn(scope)
|
|
42
|
-
}
|
|
43
|
-
}.launchIn(scope)
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
20
|
fun getCall(): Call? {
|
|
49
21
|
return call
|
|
50
22
|
}
|