Skip to main content

Snapshot

Create a snapshot.

eyeson.send({ type: 'snapshot' });

After a snapshot was created, all clients receive the snapshot_update event.

info

The download link will expire after a certain time.

{
type: 'snapshot_update',
snapshots: [
{
created_at,
creator: { /* ... */ },
id,
links: { download }
name,
room: { /* ... */ }
}
]
}

Since eyeson-js version 1.8.8 you can use eyeson.core.comApi.getSnapshot(id, callback) function to fetch snapshot information with a new created download link.

import eyeson from 'eyeson';

eyeson.core.comApi.getSnapshot(id, data => {
if (data.error) {
console.error(data.error);
return;
}
console.log(data.links.download);
});