-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
0 additions
and
587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,19 +45,5 @@ curl -X GET https://video.stream-io-api.com/api/v2/tasks/${TASK_ID}?api_key=${AP | |
-H "stream-auth-type: jwt" | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
// Example of monitoring the status of an async task | ||
// The logic is same for all async tasks | ||
const response = await client.<async operation>(); | ||
|
||
// you need to poll this endpoint | ||
const taskResponse = await client.getTaskStatus({id: response.task_id}) | ||
|
||
console.log(taskResponse.status === 'completed'); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,18 +50,5 @@ curl -X POST https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CA | |
}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
// send a custom event to all users watching the call | ||
call.sendCustomEvent({ | ||
custom: { | ||
'render-animation': 'balloons', | ||
}, | ||
user_id: 'john', | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,27 +76,5 @@ curl -X GET "https://video.stream-io-api.com/api/v2/video/call/livestream/${CALL | |
# Stream key: create a user token | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
const resp = await call.get(); | ||
|
||
// userId of existing user | ||
const userId = 'jane'; | ||
await client.upsertUsers({ | ||
users: { | ||
[userId]: { | ||
id: userId, | ||
}, | ||
}, | ||
}); | ||
const token = client.createToken(userId); | ||
const rtmpURL = resp.call.ingress.rtmp.address; | ||
const streamKey = token; | ||
|
||
console.log(rtmpURL, streamKey); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,35 +144,6 @@ curl -X PUT https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE}? | |
}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
// 1. create a new storage with all the required parameters | ||
await serverSideClient.video.createExternalStorage({ | ||
bucket: 'my-bucket', | ||
name: 'my-s3', | ||
storage_type: 's3', | ||
path: 'directory_name/', | ||
aws_s3: { | ||
s3_region: 'us-east-1', | ||
s3_api_key: 'my-access-key', | ||
s3_secret: 'my-secret', | ||
}, | ||
}); | ||
|
||
// 2. (Optional) Check storage configuration for correctness | ||
// In case of any errors, this will throw a ResponseError. | ||
await serverSideClient.video.checkExternalStorage({ | ||
name: 'my-s3', | ||
}); | ||
|
||
// 3. update the call type to use the new storage | ||
await serverSideClient.updateCallType('my-call-type', { | ||
external_storage: 'my-s3', | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -262,21 +233,6 @@ curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${C | |
}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
// update the call type to use Stream S3 storage for recordings | ||
await serverSideClient.updateCallType('my-call-type', { | ||
external_storage: 'stream-s3', | ||
}); | ||
|
||
// specify Stream S3 storage when starting call transcribing | ||
await call.startTranscription({ | ||
transcription_external_storage: 'my-storage', | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -406,19 +362,6 @@ curl -X POST https://video.stream-io-api.com/video/external_storage?api_key=${AP | |
|
||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
await serverSideClient.video.createExternalStorage({ | ||
bucket: 'my-bucket', | ||
name: 'my-gcs', | ||
storage_type: 'gcs', | ||
path: 'directory_name/', | ||
gcs_credentials: 'content of the service account file', | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -521,19 +464,5 @@ curl -X POST https://video.stream-io-api.com/video/external_storage?api_key=${AP | |
}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
await serverSideClient.video.createExternalStorage({ | ||
name: 'my-abs', | ||
storage_type: 'abs', | ||
bucket: 'my-bucket', | ||
path: 'directory_name/', | ||
abs_account_name: '...', | ||
abs_account_key: '...', | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -275,35 +275,6 @@ curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_ | |
}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
const callType = (await client.video.listCallTypes()).call_types[callTypeName]; | ||
// Remove JOIN_CALL permission from user role | ||
const userGrants = callType.grants['user'].filter( | ||
(c) => c !== VideoOwnCapability.JOIN_CALL, | ||
); | ||
// Make sure JOIN_CALL permission is set for call_member role | ||
const callMemberGrants = callType.grants['call_member']; | ||
if (!callMemberGrants.includes(VideoOwnCapability.JOIN_CALL)) { | ||
callMemberGrants.push(VideoOwnCapability.JOIN_CALL); | ||
} | ||
|
||
// Update the call type with the changes | ||
await client.video.updateCallType(callTypeName, { | ||
grants: { | ||
user: [], | ||
call_member: [ | ||
VideoOwnCapability.JOIN_CALL, | ||
VideoOwnCapability.GET_CALL, | ||
VideoOwnCapability.SEND_AUDIO, | ||
VideoOwnCapability.JOIN_CALL, | ||
], | ||
}, | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -349,13 +320,6 @@ curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${C | |
-H "stream-auth-type: jwt" | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
await call.endCall(); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -784,32 +748,6 @@ curl -X POST "https://video.stream-io-api.com/api/v2/video/call/members?api_key= | |
}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
// default sorting | ||
call.queryMembers(); | ||
|
||
// sorting and pagination | ||
const queryMembersReq = { | ||
sort: [{ field: 'user_id', direction: 1 }], | ||
limit: 2, | ||
}; | ||
const response = await call.queryMembers(queryMembersReq); | ||
|
||
// loading next page | ||
call.queryMembers({ | ||
...queryMembersReq, | ||
next: response.next, | ||
}); | ||
|
||
// filtering | ||
call.queryMembers({ | ||
filter_conditions: { role: { $eq: 'admin' } }, | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -903,21 +841,6 @@ curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${C | |
}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
await call.pinVideo({ | ||
session_id: 'session-id', | ||
user_id: 'user-id-to-pin', | ||
}); | ||
|
||
await call.unpinVideo({ | ||
session_id: 'session-id', | ||
user_id: 'user-id-to-unpin', | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -1038,29 +961,6 @@ curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_ | |
}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
await client.video.updateCallType('default', { | ||
settings: { | ||
limits: { | ||
max_duration_seconds: 3600, | ||
}, | ||
}, | ||
}); | ||
|
||
// Disable the default session timer | ||
await client.video.updateCallType('default', { | ||
name: 'default', | ||
settings: { | ||
limits: { | ||
max_duration_seconds: 0, | ||
}, | ||
}, | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,20 +79,6 @@ curl -X PATCH "https://video.stream-io-api.com/api/v2/app?api_key=${API_KEY}" \ | |
}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
// shows the current status | ||
const appSettings = await client.getAppSettings(); | ||
console.log(appSettings.app.multi_tenant_enabled); | ||
|
||
// enables teams | ||
client.updateAppSettings({ | ||
multi_tenant_enabled: true, | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -160,21 +146,6 @@ curl -X POST https://video.stream-io-api.com/api/v2/users?api_key=${API_KEY} \ | |
}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
client.upsertUsers({ | ||
users: { | ||
['<user id>']: { | ||
id: '<user id>', | ||
name: 'Sara', | ||
teams: ['red', 'blue'], | ||
}, | ||
}, | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -345,28 +316,6 @@ curl -X GET "https://video.stream-io-api.com/api/v2/users?api_key=${API_KEY}&pay | |
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
// search for users by name and team | ||
client.queryUsers({ | ||
filter_conditions: { | ||
name: 'Nick', | ||
teams: { $in: ['red', 'blue'] }, | ||
}, | ||
}); | ||
|
||
// search for users that are not part of any team | ||
client.queryUsers({ | ||
filter_conditions: { | ||
name: 'Tom', | ||
teams: null, | ||
}, | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
|
||
</Tabs> | ||
|
||
## Query Calls | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,17 +202,6 @@ curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_ | |
}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="js-deprecated" label="[email protected] (deprecated)"> | ||
|
||
```js | ||
client.video.updateCallType('allhands', { | ||
settings: { | ||
audio: { mic_default_on: false, default_device: 'earpiece' }, | ||
}, | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
Oops, something went wrong.