при помощи возможностей javascript интерфейса Screen Capture API (javascript)
https://github.com/otrubin/demo-javascript-screencast