client.video.listCallTypes();
//or
client.video.getCallType({ name: "livestream" });
Manage Types
Read call types
client.video.list_call_types()
# or
client.video.get_call_type(name= 'livestream')
client.Video().ListCallTypes(ctx, &getstream.ListCallTypesRequest{})
// or
client.Video().GetCallType(ctx, "livestream", &getstream.GetCallTypeRequest{})
curl -X GET "https://video.stream-io-api.com/api/v2/video/calltypes?api_key=${API_KEY}" \
-H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"
# or
curl -X GET "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
-H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"
Create call type
client.video.createCallType({
name: "allhands",
settings: {
audio: {
mic_default_on: true,
default_device: "speaker"
},
},
grants: {
admin: [
VideoOwnCapability.SEND_AUDIO,
VideoOwnCapability.SEND_VIDEO,
VideoOwnCapability.MUTE_USERS,
],
user: [
VideoOwnCapability.SEND_AUDIO,
VideoOwnCapability.SEND_VIDEO
],
},
});
client.video.create_call_type(
name='allhands',
settings=CallSettingsRequest(
audio=AudioSettingsRequest(
mic_default_on=True,
default_device='speaker'
),
),
grants={
"admin": [
OwnCapability.SEND_AUDIO.to_str(),
OwnCapability.SEND_VIDEO.to_str(),
OwnCapability.MUTE_USERS.to_str(),
],
"user": [
OwnCapability.SEND_AUDIO.to_str(),
OwnCapability.SEND_VIDEO.to_str()
],
},
)
client.Video().CreateCallType(ctx, &getstream.CreateCallTypeRequest{
Name: "allhands",
Settings: &getstream.CallSettingsRequest{
Audio: &getstream.AudioSettingsRequest{
MicDefaultOn: getstream.PtrTo(true),
DefaultDevice: "speaker",
},
},
Grants: &map[string][]string{
"admin": []string{
getream.SEND_AUDIO.String(),
getream.SEND_VIDEO.String(),
getream.MUTE_USERS.String(),
},
"user": []string{
getream.SEND_AUDIO.String(),
getream.SEND_VIDEO.String(),
},
},
})
curl -X POST "https://video.stream-io-api.com/api/v2/video/calltypes?api_key=${API_KEY}" \
-H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt" \
-H "Content-Type: application/json" \
-d '{
"name": "allhands",
"settings": {
"audio": {
"mic_default_on": true,
"default_device": "speaker"
}
},
"grants": {
"admin": ["send-audio", "send-video", "mute-users"],
"user": ["send-audio", "send-video"]
}
}'
Update call type
client.video.updateCallType({
name: "allhands",
settings: {
audio: {
mic_default_on: false,
default_device: "earpiece"
},
},
});
client.video.update_call_type(
name='allhands',
settings=CallSettingsRequest(
audio=AudioSettingsRequest(
mic_default_on=False,
default_device='earpiece'
),
),
)
client.Video().UpdateCallType(ctx, "allhands", &getstream.UpdateCallTypeRequest{
Settings: &getstream.CallSettingsRequest{
Audio: &getstream.AudioSettingsRequest{
MicDefaultOn: getstream.PtrTo(false),
DefaultDevice: "earpiece",
},
},
})
curl -X PUT "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
-H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt" \
-H "Content-Type: application/json" \
-d '{
"settings": {
"audio": {
"mic_default_on": false,
"default_device": "earpiece"
}
}
}'
Delete call type
client.video.deleteCallType({ name: "allhands" });
client.video.delete_call_type(name='allhands')
client.Video().DeleteCallType(ctx, "allhands", &getstream.DeleteCallTypeRequest{})
curl -X DELETE "https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE_NAME}?api_key=${API_KEY}" \
-H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"