gpt4 book ai didi

google-chrome - Chrome MediaRecorder API 共享预选标签

转载 作者:行者123 更新时间:2023-12-05 05:02:10 25 4
gpt4 key购买 nike

所以,这是我的疑问。我正在使用 MediaRecorder API 来录制我的浏览器屏幕。我可以捕获整个浏览器屏幕 + 音频(选项卡) + 我的麦克风。一切正常。但我只需要从开始录制的选项卡中捕获屏幕+音频。在 google chrome 上打开的那个弹出窗口中,当我想屏幕共享某些选项卡或应用程序时,是否可以只显示启动屏幕共享的选项卡?所以我不必每次都寻找我想分享的标签。

我没有找到任何相关信息。

在使用 google chrome API 时,我看到我们只能捕获一个选项卡,但是在这个 API 之外,是否有可能完成类似的事情?或者只有在我开发 google chrome 扩展程序时才能使用预选选项卡?

chrome.tabCapture.capture({audio: true, video: true}, callback);

最佳答案

很遗憾,您无法指定它或将其限制在当前选项卡内。

Note: Constraints never cause changes to the list of sources availablefor capture by the Screen Sharing API. This ensures that webapplications can’t force the user to share specific content byrestricting the source list until only one item is left

https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API/Using_Screen_Capture

关于google-chrome - Chrome MediaRecorder API 共享预选标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62351726/

25 4 0