client.video.createCallType({
name: '<call type name>',
settings: {
geofencing: {
names: ['european_union'],
},
},
});
//override settings on call level
call.create({
data: {
created_by_id: 'john',
settings_override: {
geofencing: {
names: ['european_union', 'united_states'],
},
},
},
});
Geofencing
With geofencing, you can define which edge nodes are utilized for video calls within specific geo-fenced areas. You can set geofences to a call type or specify when creating a new call. Multiple geo-fences can be used at the same time.
At this present, you can only select from a predefined list of geofences:
Name | Description |
---|---|
european_union | The list of countries that are part of european union |
united_states | Only selects edges in US |
canada | Only selects edges in Canada |
united_kingdom | Only selects edges in the United Kingdom |
india | Only selects edges in India |
china_exclusion | Excludes edges running in mainland China (currently, Stream edge infrastructure does not have any edge in China) |
russia_exclusion | Excludes edges running in Russia |
belarus_exclusion | Excludes edges running in Belarus |
client.video.create_call_type(
name= '<call type name>',
settings= CallSettingsRequest(
geofencing= GeofenceSettingsRequest(
names= ['european_union'],
),
),
)
# override settings on call level
call.create(
data = CallRequest(
created_by_id= 'john',
settings_override= CallSettingsRequest(
geofencing= GeofenceSettingsRequest(
names= ['european_union', 'united_states'],
),
),
),
)
client.Video().CreateCallType(ctx, &getstream.CreateCallTypeRequest{
Name: "<call type name>",
Settings: &getstream.CallSettingsRequest{
Geofencing: &getstream.GeofenceSettingsRequest{
Names: []string{"european_union"},
},
},
})
// override settings on call level
call.GetOrCreate(ctx, &getstream.GetOrCreateCallRequest{
Data: &getstream.CallRequest{
CreatedByID: getstream.PtrTo("john"),
SettingsOverride: &getstream.CallSettingsRequest{
Geofencing: &getstream.GeofenceSettingsRequest{
Names: []string{"european_union", "united_states"},
},
},
},
})
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": "<name>",
"settings": {
"geofencing": {
"names": ["european_union"]
}
}
}'
# override on call level
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": {
"geofencing": {
"names": ["european_union", "united_states"]
}
}
}
}'