Show Local Images
You can also have overlay images in your Eyeson video calls. Here you will learn how to blend in a local image into the video stream.
- bash
- shell
- node
curl -X POST \
-F "file=@path/to/local/file.png" \
-F "z-index=1" \
"https://api.eyeson.team/rooms/$ACCESS_KEY/layers"
caution
You can only select one HTTP request (-d or -F) method!
curl -X POST ^
-F "file=@path\to\local\file.png" ^
-F "z-index=1" "https://api.eyeson.team/rooms/%ACCESS_KEY%/layers"
caution
You can only select one HTTP request (-d or -F) method!
import fs from 'node:fs';
const url = 'https://api.eyeson.team/rooms/' + ACCESS_KEY + '/layers';
const file = './path/to/local/file.png';
const buffer = await fs.promises.readFile(file);
const formData = new FormData();
formData.set('file', new Blob([buffer]), 'blob');
formData.set('z-index', '1');
await fetch(url, { method: 'POST', body: formData });
If you don't want the overlay to be shown anymore, try using these snippets
- bash
- shell
- node
curl -X DELETE "https://api.eyeson.team/rooms/$ACCESS_KEY/layers/1"
curl -X DELETE "https://api.eyeson.team/rooms/%ACCESS_KEY%/layers/1"
const url = 'https://api.eyeson.team/rooms/' + ACCESS_KEY + '/layers/1';
await fetch(url, { method: 'DELETE' });