Skip to content

Instantly share code, notes, and snippets.

@guest271314
Created October 29, 2020 14:11
Show Gist options
  • Save guest271314/13739f7b0343d6403058c3dbca4f5580 to your computer and use it in GitHub Desktop.
Save guest271314/13739f7b0343d6403058c3dbca4f5580 to your computer and use it in GitHub Desktop.
screenshot
`$ flameshot full -c`
```
onfocus = async _ => {
onfocus = null;
const [item] = await navigator.clipboard.read();
const canvas = document.createElement('canvas');
const bitmap = await createImageBitmap(await item.getType(item.types[0]));
console.log(bitmap);
canvas.height = bitmap.height;
canvas.width = bitmap.width;
const ctx = canvas.getContext('bitmaprenderer');
ctx.transferFromImageBitmap(bitmap);
document.body.appendChild(canvas);
}
```
@guest271314
Copy link
Author

@jimmywarting

Re w3c/mediacapture-screen-share#145 will incorporate the above into a directory at https://github.com/guest271314/quictransport for testing.

@guest271314
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment