client.video.createCallType({
name: "<call type name>",
settings: {
screensharing: {
access_request_enabled: false,
enabled: true,
},
},
});
// override settings on call level
call.create({
data: {
created_by_id: "john",
settings_override: {
screensharing: {
enabled: false,
},
},
},
});
Settings
The Stream API provides multiple configuration options on the call type level.
- You can provide the settings when creating or updating a call type
- For maximum flexibility, you can override the settings on the call level when creating or updating a call
Code examples
Settings
client.video.create_call_type(
name= '<call type name>',
settings= CallSettingsRequest(
screensharing=ScreensharingSettingsRequest(
access_request_enabled= False,
enabled= True,
),
),
)
# override settings on call level
call.create(
data=CallRequest(
created_by_id= 'john',
settings_override= CallSettingsRequest(
screensharing= ScreensharingSettingsRequest(
enabled= False,
),
),
),
)
client.Video().CreateCallType(ctx, &getstream.CreateCallTypeRequest{
Name: "<call type name>",
Settings: &getstream.CallSettingsRequest{
Screensharing: &getstream.ScreensharingSettingsRequest{
AccessRequestEnabled: getstream.PtrTo(false),
Enabled: getstream.PtrTo(true),
},
},
})
// override settings on call level
call.GetOrCreate(ctx, &getstream.GetOrCreateCallRequest{
Data: &getstream.CallRequest{
CreatedByID: getstream.PtrTo("john"),
SettingsOverride: &getstream.CallSettingsRequest{
Screensharing: &getstream.ScreensharingSettingsRequest{
Enabled: getstream.PtrTo(false),
},
},
},
})
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": "<call type name>",
"settings": {
"screensharing": {
"access_request_enabled": false,
"enabled": true
}
}
}'
# override settings on call
curl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}?api_key=${API_KEY}" \
-H "Authorization: ${TOKEN}" \
-H "Content-Type: application/json" \
-H "stream-auth-type: jwt" \
-d '{
"data": {
"created_by_id": "john",
"settings_override": {
"screensharing": {
"enabled": false
}
}
}
}'
Notification settings
Notification settings can’t be overridden on the call level, you can only set these on the call type level.
client.video.createCallType({
name: "<call type name>",
notification_settings: {
enabled: true,
call_notification: {
apns: {
title: "{{ user.display_name }} invites you to a call",
},
enabled: true,
},
session_started: {
enabled: false,
},
},
});
client.video.create_call_type(
name= '<call type name>',
notification_settings= NotificationSettingsRequest(
enabled= True,
call_notification= EventNotificationSettingsRequest(
apns=Apnsrequest(
title= '{{ user.display_name }} invites you to a call',
),
enabled= True,
),
session_started= EventNotificationSettingsRequest(
enabled: False,
),
),
)
client.Video().CreateCallType(ctx, &getstream.CreateCallTypeRequest{
Name: "<call type name>",
NotificationSettings: &getstream.NotificationSettings{
Enabled: true,
CallNotification: getstream.EventNotificationSettings{
Apns: APNS{
Title: "{{ user.display_name }} invites you to a call",
},
Enabled: true,
},
SessionStarted: EventNotificationSettings{
Enabled: false,
},
},
})
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": "<call type name>",
"notification_settings": {
"enabled": true,
"call_notification": {
"apns": {
"title": "{{ user.display_name }} invites you to a call"
},
"enabled": true
},
"session_started": {
"enabled": false
}
}
}'
Configuration options
Settings
CallSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
audio | AudioSettingsRequest | - | - |
backstage | BackstageSettingsRequest | - | - |
broadcasting | BroadcastSettingsRequest | - | - |
frame_recording | FrameRecordingSettingsRequest | - | - |
geofencing | GeofenceSettingsRequest | - | - |
limits | LimitsSettingsRequest | - | - |
recording | RecordSettingsRequest | - | - |
ring | RingSettingsRequest | - | - |
screensharing | ScreensharingSettingsRequest | - | - |
session | SessionSettingsRequest | - | - |
thumbnails | ThumbnailsSettingsRequest | - | - |
transcription | TranscriptionSettingsRequest | - | - |
video | VideoSettingsRequest | - | - |
AudioSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
access_request_enabled | boolean | - | - |
default_device | string (speaker, earpiece) | - | Required |
mic_default_on | boolean | - | - |
noise_cancellation | NoiseCancellationSettings | - | - |
opus_dtx_enabled | boolean | - | - |
redundant_coding_enabled | boolean | - | - |
speaker_default_on | boolean | - | - |
BackstageSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
enabled | boolean | - | - |
join_ahead_time_seconds | integer | - | - |
BroadcastSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
enabled | boolean | - | - |
hls | HLSSettingsRequest | - | - |
rtmp | RTMPSettingsRequest | - | - |
FrameRecordingSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
capture_interval_in_seconds | integer | - | Required, Minimum: 2, Maximum: 60 |
mode | string (available, disabled, auto-on) | - | Required |
quality | string | - | - |
GeofenceSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
names | string[] | - | - |
LimitsSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
max_duration_seconds | integer | - | Minimum: 0 |
max_participants | integer | - | - |
RecordSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
audio_only | boolean | - | - |
layout | LayoutSettingsRequest | - | - |
mode | string (available, disabled, auto-on) | - | Required |
quality | string (360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560) | - | - |
RingSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
auto_cancel_timeout_ms | integer | - | Required, Minimum: 5000, Maximum: 180000 |
incoming_call_timeout_ms | integer | - | Required, Minimum: 5000, Maximum: 180000 |
missed_call_timeout_ms | integer | - | Minimum: 5000, Maximum: 180000 |
ScreensharingSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
access_request_enabled | boolean | - | - |
enabled | boolean | - | - |
target_resolution | TargetResolution | - | - |
SessionSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
inactivity_timeout_seconds | integer | - | Required, Minimum: 5, Maximum: 900 |
ThumbnailsSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
enabled | boolean | - | - |
TranscriptionSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
closed_caption_mode | string (available, disabled, auto-on) | - | - |
language | string (auto, en, fr, es, de, it, nl, pt, pl, ca, cs, da, el, fi, id, ja, ru, sv, ta, th, tr, hu, ro, zh, ar, tl, he, hi, hr, ko, ms, no, uk) | - | - |
mode | string (available, disabled, auto-on) | - | Required |
VideoSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
access_request_enabled | boolean | - | - |
camera_default_on | boolean | - | - |
camera_facing | string (front, back, external) | - | - |
enabled | boolean | - | - |
target_resolution | TargetResolution | - | - |
NoiseCancellationSettings
Name | Type | Description | Constraints |
---|---|---|---|
mode | string (available, disabled, auto-on) | - | Required |
HLSSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
auto_on | boolean | - | - |
enabled | boolean | - | - |
layout | LayoutSettingsRequest | - | - |
quality_tracks | string[] | - | Required, Minimum: 1, Maximum: 3 |
RTMPSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
enabled | boolean | - | - |
layout | LayoutSettingsRequest | Layout for the composed RTMP stream | - |
quality | string (360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560) | Resolution to set for the RTMP stream | - |
LayoutSettingsRequest
Name | Type | Description | Constraints |
---|---|---|---|
detect_orientation | boolean | - | - |
external_app_url | string | - | - |
external_css_url | string | - | - |
name | string (spotlight, grid, single-participant, mobile, custom) | - | Required |
options | object | - | - |
TargetResolution
Name | Type | Description | Constraints |
---|---|---|---|
bitrate | integer | - | Required, Maximum: 6000000 |
height | integer | - | Required, Minimum: 240, Maximum: 3840 |
width | integer | - | Required, Minimum: 240, Maximum: 3840 |
Notification settings
NotificationSettings
Name | Type | Description | Constraints |
---|---|---|---|
call_live_started | EventNotificationSettings | - | Required |
call_missed | EventNotificationSettings | - | Required |
call_notification | EventNotificationSettings | - | Required |
call_ring | EventNotificationSettings | - | Required |
enabled | boolean | - | Required |
session_started | EventNotificationSettings | - | Required |
EventNotificationSettings
Name | Type | Description | Constraints |
---|---|---|---|
apns | APNS | - | Required |
enabled | boolean | - | Required |
APNS
Name | Type | Description | Constraints |
---|---|---|---|
body | string | - | Required |
title | string | - | Required |