Image Sources
Add or Update Image Source
Image sources can be added to meetings as additional video spots. Images can either be referenced through a publicly accessible URL or uploaded directly as binary data.
If an image_source_id is provided, the existing image source is updated. Otherwise, a new image source is created.
When using the url parameter, the image can optionally be refreshed automatically by setting refresh_interval. This is useful for dynamically generated images such as dashboards, snapshots or camera stills.
POST /rooms/`ACCESS_KEY`/image_sources
RESPONSES 201 CREATED, 400 BAD REQUEST, 404 NOT FOUND, 410 GONE, 415 UNSUPPORTED MEDIA TYPE
REQUIRED url OR file
RECOMMENDED image_source_id
Req/Res Example: Add Image Source (URL)
- curl
- node sdk
export ACCESS_KEY=...
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"url":"https://example.com/dashboard.png",
"name":"Live Dashboard",
"image_source_id":"live-dashboard",
"object_fit":"contain",
"refresh_interval":30
}' \
"https://api.eyeson.team/rooms/$ACCESS_KEY/image_sources"
import Eyeson from '@eyeson/node';
const accessKey = '...';
const eyeson = new Eyeson();
const user = await eyeson.getUser(accessKey);
await user.setImageSource({
url: 'https://example.com/dashboard.png',
name: 'Live Dashboard',
image_source_id: 'live-dashboard',
object_fit: Eyeson.objectFitContain,
refresh_interval: 30
});
No Response
Req/Res Example: Upload Image File
- curl
- node sdk
export ACCESS_KEY=...
curl -X POST \
-F "file=@floorplan.png" \
-F "image_source_id=floor-plan" \
-F "name=Floor Plan" \
-F "object_fit=contain" \
"https://api.eyeson.team/rooms/$ACCESS_KEY/image_sources"
import fs from 'node:fs';
import Eyeson from '@eyeson/node';
const accessKey = '...';
const eyeson = new Eyeson();
const user = await eyeson.getUser(accessKey);
const buffer = await fs.promises.readFile('./floorplan.png');
await user.sendImageSource(buffer, 'floor-plan', Eyeson.objectFitContain, 'Floor Plan');
No Response
url
Type: URL (required if file is not provided)
Publicly accessible image file.
Supported formats:
- PNG
- JPG / JPEG
- WEBP
- SVG
file
Type: File [binary] (required if url is not provided)
Binary image upload.
Supported formats:
- PNG
- JPG / JPEG
- WEBP
- SVG
Exactly one of url or file must be provided.
image_source_id
Type: STRING (optional)
Choose an identifier, e.g. the current timestamp or use a custom layout position identifier.
If an existing image_source_id is provided, the corresponding image source is updated instead of creating a new one.
The image_source_id can also be referenced in a Meeting Layout to assign the image source to a specific spot. This allows images to remain at fixed positions when switching or updating layouts.
object_fit
Type: STRING (optional)
Default: auto
Controls how the image is displayed within its video spot when using auto layout.
| Value | Description |
|---|---|
auto | Automatically chooses the best display mode. |
cover | Scales the image to completely fill the available area. Parts of the image may be cropped. |
contain | Scales the image to fit completely within the available area while preserving the aspect ratio. |
The object_fit setting is only used when the active layout does not specify its own fitting behaviour for the corresponding spot.
Predefined aspect-fit layouts and custom layout maps can define the fitting (auto, cover or contain) for individual spots. In that case, the layout's fitting setting overrides the image source's object_fit value.
See the Meeting Layout documentation for more information.
refresh_interval
Type: NUMBER (optional)
Default: 0
Refresh interval in seconds for images loaded via url.
0disables automatic refresh.- Ignored when using
file.
name
Type: STRING (optional)
Custom readable name displayed in the video spot.
Remove Image Source
An image source can be removed from the meeting using its IMAGE_SOURCE_ID.
DELETE /rooms/`ACCESS_KEY`/image_sources/`IMAGE_SOURCE_ID`
RESPONSES 200 OK, 404 NOT FOUND
Req/Res Example: Remove Image Source
- curl
- node sdk
export ACCESS_KEY=...
export IMAGE_SOURCE_ID=...
curl -X DELETE \
"https://api.eyeson.team/rooms/$ACCESS_KEY/image_sources/$IMAGE_SOURCE_ID"
import Eyeson from '@eyeson/node';
const accessKey = '...';
const imageSourceId = '...';
const eyeson = new Eyeson();
const user = await eyeson.getUser(accessKey);
await user.removeImageSource(imageSourceId);
No Response