1

请教前端大佬:我想对 html 页面上的某个区域/某个精确 document 录屏,应该怎么实现...

 11 months ago
source link: https://www.v2ex.com/t/979715
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

请教前端大佬:我想对 html 页面上的某个区域/某个精确 document 录屏,应该怎么实现?

  ChatGPTPRO · 1 小时 27 分钟前 · 708 次点击

请教前端大佬

我想对 html 页面上的某个区域/某个精确 document 录屏,应该怎么实现?

我目前用的是以下这个 webTCR 的方式录屏。

但是他只能录制整个屏幕,网上找了一圈也发现他不支持录制屏幕的某个区域。

   // 初始化请求用户授权监控
    navigator.mediaDevices.getDisplayMedia(constraints).then((stream) => {
      // 对音视流进行操作
      start(stream)
    });

想做到精确的对某个标签,也就是 document ,或者说某个区域坐标,这样来录屏有实现方式吗?

我想用 js 来实现,而不是直接用外部的软件。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK