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: { /* ... */ }
}
]
}
Retrieve recent download link
Since eyeson-js version 1.8.8 you can use eyeson.core.comApi.getSnapshot(id, callback)
import eyeson from 'eyeson';
eyeson.core.comApi.getSnapshot(id, data => {
if (data.error) {
console.error(data.error);
return;
}
console.log(data.links.download);
});