@capgo/capacitor-stream-call 0.0.2
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/Package.swift +31 -0
- package/README.md +340 -0
- package/StreamCall.podspec +19 -0
- package/android/build.gradle +74 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/CallOverlayView.kt +281 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/CustomNotificationHandler.kt +142 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/IncomingCallView.kt +147 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/RingtonePlayer.kt +164 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/StreamCallPlugin.kt +1014 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/TouchInterceptWrapper.kt +31 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/UserRepository.kt +111 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/android/src/main/res/values/strings.xml +7 -0
- package/dist/docs.json +533 -0
- package/dist/esm/definitions.d.ts +169 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +32 -0
- package/dist/esm/web.js +323 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +337 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +339 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/StreamCallPlugin/CallOverlayView.swift +147 -0
- package/ios/Sources/StreamCallPlugin/CustomCallParticipantImageView.swift +60 -0
- package/ios/Sources/StreamCallPlugin/CustomCallView.swift +257 -0
- package/ios/Sources/StreamCallPlugin/CustomVideoParticipantsView.swift +107 -0
- package/ios/Sources/StreamCallPlugin/ParticipantsView.swift +206 -0
- package/ios/Sources/StreamCallPlugin/StreamCallPlugin.swift +722 -0
- package/ios/Sources/StreamCallPlugin/TouchInterceptView.swift +177 -0
- package/ios/Sources/StreamCallPlugin/UserRepository.swift +96 -0
- package/ios/Sources/StreamCallPlugin/WebviewNavigationDelegate.swift +68 -0
- package/ios/Tests/StreamCallPluginTests/StreamCallPluginTests.swift +15 -0
- package/package.json +96 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import android.view.MotionEvent
|
|
2
|
+
import android.view.ViewGroup
|
|
3
|
+
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
4
|
+
|
|
5
|
+
class TouchInterceptWrapper(private val originalViewGroup: ViewGroup) : CoordinatorLayout(
|
|
6
|
+
originalViewGroup.context
|
|
7
|
+
) {
|
|
8
|
+
init {
|
|
9
|
+
// Copy layout parameters and children
|
|
10
|
+
layoutParams = originalViewGroup.layoutParams
|
|
11
|
+
while (originalViewGroup.childCount > 0) {
|
|
12
|
+
val child = originalViewGroup.getChildAt(0)
|
|
13
|
+
originalViewGroup.removeViewAt(0)
|
|
14
|
+
addView(child)
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
override fun dispatchTouchEvent(ev: MotionEvent): Boolean {
|
|
19
|
+
// Broadcast to all children first
|
|
20
|
+
for (i in 0 until childCount) {
|
|
21
|
+
val child = getChildAt(i)
|
|
22
|
+
if (child.visibility == VISIBLE) {
|
|
23
|
+
val eventCopy = MotionEvent.obtain(ev)
|
|
24
|
+
child.dispatchTouchEvent(eventCopy)
|
|
25
|
+
eventCopy.recycle()
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// Then let the normal touch handling occur
|
|
29
|
+
return super.dispatchTouchEvent(ev)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
package ee.forgr.capacitor.streamcall
|
|
2
|
+
|
|
3
|
+
import android.content.Context
|
|
4
|
+
import android.content.SharedPreferences
|
|
5
|
+
import android.util.ArrayMap
|
|
6
|
+
import io.getstream.video.android.model.User
|
|
7
|
+
import org.json.JSONObject
|
|
8
|
+
|
|
9
|
+
data class UserCredentials(
|
|
10
|
+
val user: User,
|
|
11
|
+
val tokenValue: String
|
|
12
|
+
) {
|
|
13
|
+
val id: String
|
|
14
|
+
get() = user.id
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface UserRepository {
|
|
18
|
+
fun save(user: UserCredentials)
|
|
19
|
+
fun loadCurrentUser(): UserCredentials?
|
|
20
|
+
fun removeCurrentUser()
|
|
21
|
+
fun save(token: String)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Note: This is just for simplicity. In a production environment,
|
|
26
|
+
* consider using more secure storage solutions like EncryptedSharedPreferences
|
|
27
|
+
* or a proper database with encryption.
|
|
28
|
+
*/
|
|
29
|
+
class SecureUserRepository private constructor(context: Context) : UserRepository {
|
|
30
|
+
|
|
31
|
+
private val sharedPreferences: SharedPreferences = context.getSharedPreferences(
|
|
32
|
+
PREFS_NAME,
|
|
33
|
+
Context.MODE_PRIVATE
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
companion object {
|
|
37
|
+
private const val PREFS_NAME = "stream_video_prefs"
|
|
38
|
+
private const val KEY_USER = "stream.video.user"
|
|
39
|
+
private const val KEY_TOKEN = "stream.video.token"
|
|
40
|
+
|
|
41
|
+
@Volatile
|
|
42
|
+
private var instance: SecureUserRepository? = null
|
|
43
|
+
|
|
44
|
+
fun getInstance(context: Context): SecureUserRepository {
|
|
45
|
+
return instance ?: synchronized(this) {
|
|
46
|
+
instance ?: SecureUserRepository(context.applicationContext).also { instance = it }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
override fun save(user: UserCredentials) {
|
|
52
|
+
val customJson = user.user.custom?.let { customMap ->
|
|
53
|
+
JSONObject().apply {
|
|
54
|
+
customMap.forEach { (key, value) ->
|
|
55
|
+
put(key, value)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
val userJson = JSONObject().apply {
|
|
61
|
+
put("id", user.user.id)
|
|
62
|
+
put("name", user.user.name)
|
|
63
|
+
put("image", user.user.image)
|
|
64
|
+
put("role", user.user.role)
|
|
65
|
+
put("custom", customJson)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
with(sharedPreferences.edit()) {
|
|
69
|
+
putString(KEY_USER, userJson.toString())
|
|
70
|
+
putString(KEY_TOKEN, user.tokenValue)
|
|
71
|
+
apply()
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
override fun save(token: String) {
|
|
76
|
+
sharedPreferences.edit().putString(KEY_TOKEN, token).apply()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
override fun loadCurrentUser(): UserCredentials? {
|
|
80
|
+
val userJson = sharedPreferences.getString(KEY_USER, null)
|
|
81
|
+
val token = sharedPreferences.getString(KEY_TOKEN, null)
|
|
82
|
+
|
|
83
|
+
return try {
|
|
84
|
+
if (userJson != null && token != null) {
|
|
85
|
+
val jsonObject = JSONObject(userJson)
|
|
86
|
+
|
|
87
|
+
val user = User(
|
|
88
|
+
id = jsonObject.getString("id"),
|
|
89
|
+
name = jsonObject.optString("name"),
|
|
90
|
+
image = jsonObject.optString("image"),
|
|
91
|
+
role = jsonObject.optString("role"),
|
|
92
|
+
custom = ArrayMap()
|
|
93
|
+
)
|
|
94
|
+
UserCredentials(user, token)
|
|
95
|
+
} else {
|
|
96
|
+
null
|
|
97
|
+
}
|
|
98
|
+
} catch (e: Exception) {
|
|
99
|
+
e.printStackTrace()
|
|
100
|
+
null
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
override fun removeCurrentUser() {
|
|
105
|
+
with(sharedPreferences.edit()) {
|
|
106
|
+
remove(KEY_USER)
|
|
107
|
+
remove(KEY_TOKEN)
|
|
108
|
+
apply()
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<resources xmlns:tools="http://schemas.android.com/tools">
|
|
3
|
+
<string name="CAPACITOR_STREAM_VIDEO_APIKEY" />
|
|
4
|
+
<string name="stream_video_incoming_call_notification_channel_title">Incoming Calls</string>
|
|
5
|
+
<string name="stream_video_incoming_call_notification_channel_description">Incoming audio and video call alerts</string>
|
|
6
|
+
<string name="stream_video_incoming_call_low_priority_notification_channel_description">Incoming audio and video call alerts</string>
|
|
7
|
+
</resources>
|
package/dist/docs.json
ADDED
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api": {
|
|
3
|
+
"name": "StreamCallPlugin",
|
|
4
|
+
"slug": "streamcallplugin",
|
|
5
|
+
"docs": "",
|
|
6
|
+
"tags": [
|
|
7
|
+
{
|
|
8
|
+
"text": "StreamCallPlugin",
|
|
9
|
+
"name": "interface"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"text": "Capacitor plugin for Stream Video calling functionality",
|
|
13
|
+
"name": "description"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"methods": [
|
|
17
|
+
{
|
|
18
|
+
"name": "login",
|
|
19
|
+
"signature": "(options: LoginOptions) => Promise<SuccessResponse>",
|
|
20
|
+
"parameters": [
|
|
21
|
+
{
|
|
22
|
+
"name": "options",
|
|
23
|
+
"docs": "- Login configuration",
|
|
24
|
+
"type": "LoginOptions"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"returns": "Promise<SuccessResponse>",
|
|
28
|
+
"tags": [
|
|
29
|
+
{
|
|
30
|
+
"name": "param",
|
|
31
|
+
"text": "options - Login configuration"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "returns",
|
|
35
|
+
"text": "Success status"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "example",
|
|
39
|
+
"text": "await StreamCall.login({\n token: 'your-token',\n userId: 'user-123',\n name: 'John Doe',\n apiKey: 'your-api-key'\n});"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"docs": "Login to Stream Video service",
|
|
43
|
+
"complexTypes": [
|
|
44
|
+
"SuccessResponse",
|
|
45
|
+
"LoginOptions"
|
|
46
|
+
],
|
|
47
|
+
"slug": "login"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "logout",
|
|
51
|
+
"signature": "() => Promise<SuccessResponse>",
|
|
52
|
+
"parameters": [],
|
|
53
|
+
"returns": "Promise<SuccessResponse>",
|
|
54
|
+
"tags": [
|
|
55
|
+
{
|
|
56
|
+
"name": "returns",
|
|
57
|
+
"text": "Success status"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "example",
|
|
61
|
+
"text": "await StreamCall.logout();"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"docs": "Logout from Stream Video service",
|
|
65
|
+
"complexTypes": [
|
|
66
|
+
"SuccessResponse"
|
|
67
|
+
],
|
|
68
|
+
"slug": "logout"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "call",
|
|
72
|
+
"signature": "(options: CallOptions) => Promise<SuccessResponse>",
|
|
73
|
+
"parameters": [
|
|
74
|
+
{
|
|
75
|
+
"name": "options",
|
|
76
|
+
"docs": "- Call configuration",
|
|
77
|
+
"type": "CallOptions"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"returns": "Promise<SuccessResponse>",
|
|
81
|
+
"tags": [
|
|
82
|
+
{
|
|
83
|
+
"name": "param",
|
|
84
|
+
"text": "options - Call configuration"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "returns",
|
|
88
|
+
"text": "Success status"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "example",
|
|
92
|
+
"text": "await StreamCall.call({\n userId: 'user-456',\n type: 'video',\n ring: true\n});"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"docs": "Initiate a call to another user",
|
|
96
|
+
"complexTypes": [
|
|
97
|
+
"SuccessResponse",
|
|
98
|
+
"CallOptions"
|
|
99
|
+
],
|
|
100
|
+
"slug": "call"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "endCall",
|
|
104
|
+
"signature": "() => Promise<SuccessResponse>",
|
|
105
|
+
"parameters": [],
|
|
106
|
+
"returns": "Promise<SuccessResponse>",
|
|
107
|
+
"tags": [
|
|
108
|
+
{
|
|
109
|
+
"name": "returns",
|
|
110
|
+
"text": "Success status"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "example",
|
|
114
|
+
"text": "await StreamCall.endCall();"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"docs": "End the current call",
|
|
118
|
+
"complexTypes": [
|
|
119
|
+
"SuccessResponse"
|
|
120
|
+
],
|
|
121
|
+
"slug": "endcall"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "setMicrophoneEnabled",
|
|
125
|
+
"signature": "(options: { enabled: boolean; }) => Promise<SuccessResponse>",
|
|
126
|
+
"parameters": [
|
|
127
|
+
{
|
|
128
|
+
"name": "options",
|
|
129
|
+
"docs": "- Microphone state",
|
|
130
|
+
"type": "{ enabled: boolean; }"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"returns": "Promise<SuccessResponse>",
|
|
134
|
+
"tags": [
|
|
135
|
+
{
|
|
136
|
+
"name": "param",
|
|
137
|
+
"text": "options - Microphone state"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "returns",
|
|
141
|
+
"text": "Success status"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "example",
|
|
145
|
+
"text": "await StreamCall.setMicrophoneEnabled({ enabled: false });"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"docs": "Enable or disable microphone",
|
|
149
|
+
"complexTypes": [
|
|
150
|
+
"SuccessResponse"
|
|
151
|
+
],
|
|
152
|
+
"slug": "setmicrophoneenabled"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "setCameraEnabled",
|
|
156
|
+
"signature": "(options: { enabled: boolean; }) => Promise<SuccessResponse>",
|
|
157
|
+
"parameters": [
|
|
158
|
+
{
|
|
159
|
+
"name": "options",
|
|
160
|
+
"docs": "- Camera state",
|
|
161
|
+
"type": "{ enabled: boolean; }"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"returns": "Promise<SuccessResponse>",
|
|
165
|
+
"tags": [
|
|
166
|
+
{
|
|
167
|
+
"name": "param",
|
|
168
|
+
"text": "options - Camera state"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "returns",
|
|
172
|
+
"text": "Success status"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "example",
|
|
176
|
+
"text": "await StreamCall.setCameraEnabled({ enabled: false });"
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"docs": "Enable or disable camera",
|
|
180
|
+
"complexTypes": [
|
|
181
|
+
"SuccessResponse"
|
|
182
|
+
],
|
|
183
|
+
"slug": "setcameraenabled"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "addListener",
|
|
187
|
+
"signature": "(eventName: 'callEvent', listenerFunc: (event: CallEvent) => void) => Promise<{ remove: () => Promise<void>; }>",
|
|
188
|
+
"parameters": [
|
|
189
|
+
{
|
|
190
|
+
"name": "eventName",
|
|
191
|
+
"docs": "- Name of the event to listen for",
|
|
192
|
+
"type": "'callEvent'"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"name": "listenerFunc",
|
|
196
|
+
"docs": "- Callback function",
|
|
197
|
+
"type": "(event: CallEvent) => void"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"returns": "Promise<{ remove: () => Promise<void>; }>",
|
|
201
|
+
"tags": [
|
|
202
|
+
{
|
|
203
|
+
"name": "param",
|
|
204
|
+
"text": "eventName - Name of the event to listen for"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "param",
|
|
208
|
+
"text": "listenerFunc - Callback function"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "returns",
|
|
212
|
+
"text": "Function to remove listener"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "example",
|
|
216
|
+
"text": "const listener = await StreamCall.addListener('callEvent', (event) => {\n console.log(`Call ${event.callId} is now ${event.state}`);\n});"
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
"docs": "Add listener for call events",
|
|
220
|
+
"complexTypes": [
|
|
221
|
+
"CallEvent"
|
|
222
|
+
],
|
|
223
|
+
"slug": "addlistenercallevent-"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "removeAllListeners",
|
|
227
|
+
"signature": "() => Promise<void>",
|
|
228
|
+
"parameters": [],
|
|
229
|
+
"returns": "Promise<void>",
|
|
230
|
+
"tags": [
|
|
231
|
+
{
|
|
232
|
+
"name": "returns"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"name": "example",
|
|
236
|
+
"text": "await StreamCall.removeAllListeners();"
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"docs": "Remove all event listeners",
|
|
240
|
+
"complexTypes": [],
|
|
241
|
+
"slug": "removealllisteners"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "acceptCall",
|
|
245
|
+
"signature": "() => Promise<SuccessResponse>",
|
|
246
|
+
"parameters": [],
|
|
247
|
+
"returns": "Promise<SuccessResponse>",
|
|
248
|
+
"tags": [
|
|
249
|
+
{
|
|
250
|
+
"name": "returns",
|
|
251
|
+
"text": "Success status"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "example",
|
|
255
|
+
"text": "await StreamCall.acceptCall();"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"docs": "Accept an incoming call",
|
|
259
|
+
"complexTypes": [
|
|
260
|
+
"SuccessResponse"
|
|
261
|
+
],
|
|
262
|
+
"slug": "acceptcall"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": "rejectCall",
|
|
266
|
+
"signature": "() => Promise<SuccessResponse>",
|
|
267
|
+
"parameters": [],
|
|
268
|
+
"returns": "Promise<SuccessResponse>",
|
|
269
|
+
"tags": [
|
|
270
|
+
{
|
|
271
|
+
"name": "returns",
|
|
272
|
+
"text": "Success status"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "example",
|
|
276
|
+
"text": "await StreamCall.rejectCall();"
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"docs": "Reject an incoming call",
|
|
280
|
+
"complexTypes": [
|
|
281
|
+
"SuccessResponse"
|
|
282
|
+
],
|
|
283
|
+
"slug": "rejectcall"
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"properties": []
|
|
287
|
+
},
|
|
288
|
+
"interfaces": [
|
|
289
|
+
{
|
|
290
|
+
"name": "SuccessResponse",
|
|
291
|
+
"slug": "successresponse",
|
|
292
|
+
"docs": "",
|
|
293
|
+
"tags": [
|
|
294
|
+
{
|
|
295
|
+
"text": "SuccessResponse",
|
|
296
|
+
"name": "interface"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"text": "Standard response indicating operation success/failure",
|
|
300
|
+
"name": "description"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"text": "{boolean} success - Whether the operation succeeded",
|
|
304
|
+
"name": "property"
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
"methods": [],
|
|
308
|
+
"properties": [
|
|
309
|
+
{
|
|
310
|
+
"name": "success",
|
|
311
|
+
"tags": [],
|
|
312
|
+
"docs": "Whether the operation was successful",
|
|
313
|
+
"complexTypes": [],
|
|
314
|
+
"type": "boolean"
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "LoginOptions",
|
|
320
|
+
"slug": "loginoptions",
|
|
321
|
+
"docs": "",
|
|
322
|
+
"tags": [
|
|
323
|
+
{
|
|
324
|
+
"text": "LoginOptions",
|
|
325
|
+
"name": "interface"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"text": "Configuration options for logging into the Stream Video service",
|
|
329
|
+
"name": "description"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"text": "{string} token - Stream Video API token for authentication",
|
|
333
|
+
"name": "property"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"text": "{string} userId - Unique identifier for the current user",
|
|
337
|
+
"name": "property"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"text": "{string} name - Display name for the current user",
|
|
341
|
+
"name": "property"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"text": "{string} [imageURL] - Avatar URL for the current user",
|
|
345
|
+
"name": "property"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"text": "{string} apiKey - Stream Video API key for your application",
|
|
349
|
+
"name": "property"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"text": "{string} [magicDivId] - DOM element ID where video will be rendered",
|
|
353
|
+
"name": "property"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"text": "{Object} [refreshToken] - Token refresh configuration",
|
|
357
|
+
"name": "property"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"text": "{string} refreshToken.url - Endpoint URL for token refresh",
|
|
361
|
+
"name": "property"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"text": "{Record<string, string>} [refreshToken.headers] - Custom headers for refresh request",
|
|
365
|
+
"name": "property"
|
|
366
|
+
}
|
|
367
|
+
],
|
|
368
|
+
"methods": [],
|
|
369
|
+
"properties": [
|
|
370
|
+
{
|
|
371
|
+
"name": "token",
|
|
372
|
+
"tags": [],
|
|
373
|
+
"docs": "Stream Video API token",
|
|
374
|
+
"complexTypes": [],
|
|
375
|
+
"type": "string"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "userId",
|
|
379
|
+
"tags": [],
|
|
380
|
+
"docs": "User ID for the current user",
|
|
381
|
+
"complexTypes": [],
|
|
382
|
+
"type": "string"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "name",
|
|
386
|
+
"tags": [],
|
|
387
|
+
"docs": "Display name for the current user",
|
|
388
|
+
"complexTypes": [],
|
|
389
|
+
"type": "string"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"name": "imageURL",
|
|
393
|
+
"tags": [],
|
|
394
|
+
"docs": "Optional avatar URL for the current user",
|
|
395
|
+
"complexTypes": [],
|
|
396
|
+
"type": "string | undefined"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"name": "apiKey",
|
|
400
|
+
"tags": [],
|
|
401
|
+
"docs": "Stream Video API key",
|
|
402
|
+
"complexTypes": [],
|
|
403
|
+
"type": "string"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"name": "magicDivId",
|
|
407
|
+
"tags": [],
|
|
408
|
+
"docs": "ID of the HTML element where the video will be rendered",
|
|
409
|
+
"complexTypes": [],
|
|
410
|
+
"type": "string | undefined"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "refreshToken",
|
|
414
|
+
"tags": [],
|
|
415
|
+
"docs": "Configuration for token refresh",
|
|
416
|
+
"complexTypes": [
|
|
417
|
+
"Record"
|
|
418
|
+
],
|
|
419
|
+
"type": "{ url: string; headers?: Record<string, string> | undefined; } | undefined"
|
|
420
|
+
}
|
|
421
|
+
]
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"name": "CallOptions",
|
|
425
|
+
"slug": "calloptions",
|
|
426
|
+
"docs": "",
|
|
427
|
+
"tags": [
|
|
428
|
+
{
|
|
429
|
+
"text": "CallOptions",
|
|
430
|
+
"name": "interface"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"text": "Options for initiating a video call",
|
|
434
|
+
"name": "description"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"text": "{string} userId - ID of the user to call",
|
|
438
|
+
"name": "property"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"text": "{string} [type=default] - Type of call",
|
|
442
|
+
"name": "property"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"text": "{boolean} [ring=true] - Whether to send ring notification",
|
|
446
|
+
"name": "property"
|
|
447
|
+
}
|
|
448
|
+
],
|
|
449
|
+
"methods": [],
|
|
450
|
+
"properties": [
|
|
451
|
+
{
|
|
452
|
+
"name": "userId",
|
|
453
|
+
"tags": [],
|
|
454
|
+
"docs": "User ID of the person to call",
|
|
455
|
+
"complexTypes": [],
|
|
456
|
+
"type": "string"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"name": "type",
|
|
460
|
+
"tags": [],
|
|
461
|
+
"docs": "Type of call, defaults to 'default'",
|
|
462
|
+
"complexTypes": [],
|
|
463
|
+
"type": "string | undefined"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"name": "ring",
|
|
467
|
+
"tags": [],
|
|
468
|
+
"docs": "Whether to ring the other user, defaults to true",
|
|
469
|
+
"complexTypes": [],
|
|
470
|
+
"type": "boolean | undefined"
|
|
471
|
+
}
|
|
472
|
+
]
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"name": "CallEvent",
|
|
476
|
+
"slug": "callevent",
|
|
477
|
+
"docs": "",
|
|
478
|
+
"tags": [
|
|
479
|
+
{
|
|
480
|
+
"text": "CallEvent",
|
|
481
|
+
"name": "interface"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"text": "Event emitted when call state changes",
|
|
485
|
+
"name": "description"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"text": "{string} callId - Unique identifier of the call",
|
|
489
|
+
"name": "property"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"text": "{string} state - Current state of the call (joined, left, ringing, etc)",
|
|
493
|
+
"name": "property"
|
|
494
|
+
}
|
|
495
|
+
],
|
|
496
|
+
"methods": [],
|
|
497
|
+
"properties": [
|
|
498
|
+
{
|
|
499
|
+
"name": "callId",
|
|
500
|
+
"tags": [],
|
|
501
|
+
"docs": "ID of the call",
|
|
502
|
+
"complexTypes": [],
|
|
503
|
+
"type": "string"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"name": "state",
|
|
507
|
+
"tags": [],
|
|
508
|
+
"docs": "Current state of the call",
|
|
509
|
+
"complexTypes": [],
|
|
510
|
+
"type": "string"
|
|
511
|
+
}
|
|
512
|
+
]
|
|
513
|
+
}
|
|
514
|
+
],
|
|
515
|
+
"enums": [],
|
|
516
|
+
"typeAliases": [
|
|
517
|
+
{
|
|
518
|
+
"name": "Record",
|
|
519
|
+
"slug": "record",
|
|
520
|
+
"docs": "Construct a type with a set of properties K of type T",
|
|
521
|
+
"types": [
|
|
522
|
+
{
|
|
523
|
+
"text": "{\r\n [P in K]: T;\r\n}",
|
|
524
|
+
"complexTypes": [
|
|
525
|
+
"K",
|
|
526
|
+
"T"
|
|
527
|
+
]
|
|
528
|
+
}
|
|
529
|
+
]
|
|
530
|
+
}
|
|
531
|
+
],
|
|
532
|
+
"pluginConfigs": []
|
|
533
|
+
}
|