DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 966,155 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in

Discussion on: Screen Recording in 10 lines of Vanilla JS

Collapse
 
sachinkammar profile image
Sachin Kammar

Is there a way to record a tab/window/specific site without user permissions?

Collapse
 
sebastianstamm profile image
Sebastian Stamm Author

Not in a video stream. The closest thing you could do is periodically get a snapshot of the current DOM with something like document.body.innerHTML and send it to your server. You could then reconstruct the site based on this HTML.

If you want mouse cursor positions too, you would need a global mousemove handler that tracks the cursor position and also send it to your server.

Of course this only works on your own page. Recording another tab or even window this way without the users consent is fortunately not possible :)