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 }} calls you",
body: "{{ user.display_name }} calls you",
},
enabled: true,
},
call_ring: {
apns: {
title: "{{ user.display_name }} calls you",
body: "{{ user.display_name }} calls you",
},
enabled: true,
},
call_live_started: {
enabled: true,
apns: {
title: "{{ call.display_name }} started",
body: "{{ user.display_name }} started",
},
},
call_missed: {
enabled: true,
apns: {
title: "missed call from {{ user.display_name }}",
body: "missed call from {{ user.display_name }}",
},
},
session_started: {
enabled: true,
apns: {
title: "{{ call.display_name }} started",
body: "{{ call.display_name }} started",
},
},
},
});client.video.create_call_type(
name=call_type_name,
notification_settings={
"enabled": True,
"call_notification": {
"apns": {
"title": "{{ user.display_name }} calls you",
"body": "{{ user.display_name }} calls you"
},
"enabled": True
},
"call_ring": {
"apns": {
"title": "{{ user.display_name }} calls you",
"body": "{{ user.display_name }} calls you"
},
"enabled": True
},
"call_live_started": {
"enabled": True,
"apns": {
"title": "{{ call.display_name }} started",
"body": "{{ user.display_name }} started"
}
},
"call_missed": {
"enabled": True,
"apns": {
"title": "missed call from {{ user.display_name }}",
"body": "missed call from {{ user.display_name }}"
}
},
"session_started": {
"enabled": True,
"apns": {
"title": "{{ call.display_name }} started",
"body": "{{ call.display_name }} started"
}
}
}
)client.Video().CreateCallType(ctx, &getstream.CreateCallTypeRequest{
Name: "test-call-type",
NotificationSettings: &getstream.NotificationSettings{
Enabled: true,
CallNotification: getstream.EventNotificationSettings{
APNS: getstream.APNS{
Title: "{{ user.display_name }} calls you",
Body: "{{ user.display_name }} calls you",
},
Enabled: true,
},
CallRing: getstream.EventNotificationSettings{
APNS: getstream.APNS{
Title: "{{ user.display_name }} calls you",
Body: "{{ user.display_name }} calls you",
},
Enabled: true,
},
CallLiveStarted: getstream.EventNotificationSettings{
Enabled: true,
APNS: getstream.APNS{
Title: "{{ call.display_name }} started",
Body: "{{ user.display_name }} started",
},
},
CallMissed: getstream.EventNotificationSettings{
Enabled: true,
APNS: getstream.APNS{
Title: "missed call from {{ user.display_name }}",
Body: "missed call from {{ user.display_name }}",
},
},
SessionStarted: getstream.EventNotificationSettings{
Enabled: true,
APNS: getstream.APNS{
Title: "{{ call.display_name }} started",
Body: "{{ call.display_name }} started",
},
},
},
})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 }} calls you",
"body": "{{ user.display_name }} calls you"
},
"enabled": true
},
"call_ring": {
"apns": {
"title": "{{ user.display_name }} calls you",
"body": "{{ user.display_name }} calls you"
},
"enabled": true
},
"call_live_started": {
"enabled": true,
"apns": {
"title": "{{ call.display_name }} started",
"body": "{{ user.display_name }} started"
}
},
"call_missed": {
"enabled": true,
"apns": {
"title": "missed call from {{ user.display_name }}",
"body": "missed call from {{ user.display_name }}"
}
},
"session_started": {
"enabled": true,
"apns": {
"title": "{{ call.display_name }} started",
"body": "{{ call.display_name }} started"
}
}
}
}'Configuration options
Settings
CallSettingsRequest
| Name | Type | Description | Constraints |
|---|---|---|---|
audio | AudioSettingsRequest | - | - |
backstage | BackstageSettingsRequest | - | - |
broadcasting | BroadcastSettingsRequest | - | - |
frame_recording | FrameRecordingSettingsRequest | - | - |
geofencing | GeofenceSettingsRequest | - | - |
individual_recording | IndividualRecordingSettingsRequest | - | - |
ingress | IngressSettingsRequest | - | - |
limits | LimitsSettingsRequest | - | - |
raw_recording | RawRecordingSettingsRequest | - | - |
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 |
hifi_audio_enabled | boolean | - | - |
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 (360p, 480p, 720p, 1080p, 1440p) | - | - |
GeofenceSettingsRequest
| Name | Type | Description | Constraints |
|---|---|---|---|
names | string[] | - | - |
IndividualRecordingSettingsRequest
| Name | Type | Description | Constraints |
|---|---|---|---|
mode | string (available, disabled, auto-on) | Recording mode. One of: available, disabled, auto-on | Required |
IngressSettingsRequest
| Name | Type | Description | Constraints |
|---|---|---|---|
audio_encoding_options | IngressAudioEncodingOptionsRequest | - | - |
enabled | boolean | - | - |
video_encoding_options | object | - | - |
LimitsSettingsRequest
| Name | Type | Description | Constraints |
|---|---|---|---|
max_duration_seconds | integer | - | Minimum: 0 |
max_participants | integer | - | - |
max_participants_exclude_owner | boolean | - | - |
max_participants_exclude_roles | string[] | - | - |
RawRecordingSettingsRequest
| Name | Type | Description | Constraints |
|---|---|---|---|
mode | string (available, disabled, auto-on) | Recording mode. One of: available, disabled, auto-on | Required |
RecordSettingsRequest
| Name | Type | Description | Constraints |
|---|---|---|---|
audio_only | boolean | Whether to record audio only | - |
layout | LayoutSettingsRequest | Layout settings for recording | - |
mode | string (available, disabled, auto-on) | Recording mode. One of: available, disabled, auto-on | Required |
quality | string (360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560) | Recording quality. One of: 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 | When none of the callees accept a ring call in this time a rejection will be sent by the caller with reason 'timeout' by the SDKs | Required, Minimum: 5000, Maximum: 180000 |
incoming_call_timeout_ms | integer | When a callee is online but doesn't answer a ring call in this time a rejection will be sent with reason 'timeout' by the SDKs | Required, Minimum: 5000, Maximum: 180000 |
missed_call_timeout_ms | integer | When a callee doesn't accept or reject a ring call in this time a missed call event will be sent | 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, bg, et, sl, sk) | - | - |
mode | string (available, disabled, auto-on) | - | - |
speech_segment_config | SpeechSegmentConfig | - | - |
translation | TranslationSettings | - | - |
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 | Whether HLS broadcasting should start automatically | - |
enabled | boolean | Whether HLS broadcasting is enabled | - |
layout | LayoutSettingsRequest | Layout settings for HLS | - |
quality_tracks | string[] | Quality tracks for HLS. One of: 360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560 | Required, Minimum: 1, Maximum: 3 |
RTMPSettingsRequest
| Name | Type | Description | Constraints |
|---|---|---|---|
enabled | boolean | Whether RTMP broadcasting is enabled | - |
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. One of: 360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560 | - |
IngressAudioEncodingOptionsRequest
| Name | Type | Description | Constraints |
|---|---|---|---|
bitrate | integer | - | Required, Minimum: 16000, Maximum: 128000 |
channels | integer (1, 2) | - | Required |
enable_dtx | boolean | - | - |
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 |
SpeechSegmentConfig
| Name | Type | Description | Constraints |
|---|---|---|---|
max_speech_caption_ms | integer | - | - |
silence_duration_ms | integer | - | - |
TranslationSettings
| Name | Type | Description | Constraints |
|---|---|---|---|
enabled | boolean | - | Required |
languages | string[] | - | Required |
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 |
fcm | FCM | - | Required |
APNS
| Name | Type | Description | Constraints |
|---|---|---|---|
body | string | - | Required |
content-available | integer | - | - |
data | object | - | - |
mutable-content | integer | - | - |
sound | string | - | - |
title | string | - | Required |
FCM
| Name | Type | Description | Constraints |
|---|---|---|---|
data | object | - | - |