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
Configuration options
The Stream API provides multiple configuration options on the call type level.
Audio
Setting Name | Type | Description |
---|---|---|
access_request_enabled | Boolean | When true users that do not have permission to this feature can request access for it |
opus_dtx_enabled | Boolean | When true OPUS DTX is enabled |
redundant_coding_enabled | Boolean | When true redundant audio transmission is enabled |
mic_default_on | Boolean | When true the user will join with the microphone enabled by default |
speaker_default_on | Boolean | When true the user will join with the audio turned on by default |
default_device | String speaker or earpiece | The default audio device to use |
Backstage
Setting Name | Type | Description |
---|---|---|
enabled | Boolean | When backstage is enabled, calls will be in backstage mode when created and can be joined by users only after goLive is called |
Video
Setting Name | Type | Description |
---|---|---|
enabled | Boolean | Defines whether video is enabled for the call |
access_request_enabled | Boolean | When true users that do not have permission to this feature can request access for it |
camera_default_on | Boolean | When true , the camera will be turned on when joining the call |
camera_facing | String front , back or external | When applicable, the camera that should be used by default |
target_resolution | Target Resolution Object | The ideal resolution that video publishers should send |
The target resolution object is an advanced resolution. Changing this from the default values can lead to poor performance. This is how you define it:
Setting Name | Type | Description |
---|---|---|
width | Number | The width in pixels |
height | Number | The height in pixels |
bitrate | Number | The bitrate |
Screensharing
Setting Name | Type | Description |
---|---|---|
enabled | Boolean | Defines whether screensharing is enabled |
access_request_enabled | Boolean | When true users that do not have permission to this feature can request access for it |
Recording
Setting Name | Type | Description |
---|---|---|
mode | String available , disabled or auto-on | available → recording can be requested disabled → recording is disabled auto-on → recording starts and stops automatically when one or multiple users join the call |
quality | String audio-only , 360p , 480p , 720p , 1080p , 1440p | Defines the resolution of the recording |
audio_only | boolean | If true the recordings will only contain audio |
layout | object, for more information see the API docs | Configuration options for the recording application |
Broadcasting
Setting Name | Type | Description |
---|---|---|
enabled | Boolean | Defines whether broadcasting is enabled |
hls | HLS Settings (object) | Settings for HLS broadcasting |
HLS Settings
Setting Name | Type | Description |
---|---|---|
enabled | Boolean | Defines whether HLS is enabled or not |
auto_on | Boolean | When true HLS streaming will start as soon as users join the call |
quality_tracks | String audio-only , 360p , 480p , 720p , 1080p , 1440p | The tracks to publish for the HLS stream (up to three tracks) |
Geofencing
Setting Name | Type | Description |
---|---|---|
names | List of one or more of these strings european_union , iran_north_korea_syria_exclusion , china_exclusion , russia_exclusion , belarus_exclusion , india , united_states , canada | The list of geofences that are used for the calls of these type |
More information can be found in the API docs.
Transcription
Setting Name | Type | Description |
---|---|---|
mode | String available , disabled or auto-on | Not implemented yet |
closed_caption_mode | String | Not implemented yet |
Ringing
Setting Name | Type | Description |
---|---|---|
incoming_call_timeout_ms | Number | Defines how long the SDK should display the incoming call screen before discarding the call (in ms) |
auto_cancel_timeout_ms | Number | Defines how long the caller should wait for others to accept the call before canceling (in ms) |
Push Notifications Settings
Setting Name | Type | Description |
---|---|---|
enabled | Boolean | |
call_live_started | Event Notification Settings Object | The notification settings used for call_live_started events |
session_started | Event Notification Settings Object | The notification settings used for session_started events |
call_notification | Event Notification Settings Object | The notification settings used for call_notification events |
call_ring | Event Notification Settings Object | The notification settings used for call_ring events |
In order to define the event notification settings object, here is the structure of how it should look:
Setting Name | Type | Description |
---|---|---|
enabled | Boolean | Whether this object is enabled |
apns | APNS Settings Object | The settings for APN notifications |
APNS Settings Object
Remote notifications can only be customized if your application implements a Notification Service Extension. For simple customizations, you can change the title and body fields at the call type level. Both title and body fields are handlebars templates with call and user objects available in their scope.
Setting Name | Type | Description |
---|---|---|
title | Template | The string template for the title field of the notification |
body | Template | The string template for the body field of the notification |
- 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
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
}
}
}'