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 mime from 'mime-types';
import fetch, { Blob, FormData } from 'node-fetch';
import fs from 'node:fs/promises';
const url = 'https://api.eyeson.team/rooms/' + ACCESS_KEY + '/layers';
const type = mime.lookup(file);
const buffer = await fs.readFile(file);
const blob = new Blob([buffer], { type });
const formData = new FormData();
formData.set('file', 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' });