webview - 电子:分享使用带有 WebRTC 的 desktopCapture 将内容标记为视频流
问题描述
我在 BrowserWindow 中有一个 WebView。Webview 充当嵌入式浏览器。我想使用 WebRTC 进行屏幕共享,其中只有我的 WebView 被共享。
有谁知道,事件 desktop-capturer-get-sources https://electronjs.org/docs/api/web-contents#event-desktop-capturer-get-sources 是为了什么?
解决方案
如果你使用 electron.js 构建你的桌面应用程序,你可以通过 electron 官方文档提供的这个示例
https://electronjs.org/docs/api/desktop-capturer#desktopcapturergetsourcesoptions-callback。
输出的行为与 webrtc 中使用的任何音频/视频流相同
推荐阅读
- c# - 将列表放入类 c#
- javascript - 为什么这包含()案例返回假?
- javascript - 当我打开我的 React 应用程序时,Safari 报告“Unexpected token 'const'”
- javascript - Ionic 5:从多个组件更新对象数组
- c# - 从richTextBox 发送所有字节
- r - 反应式不能动态使用下拉菜单
- python - NLTK MLE 模型澄清三元组及更多
- c# - 如何根据房间名称过滤c#中的日历数据?
- c++ - 如果基类包含双指针成员,则派生类的构造函数
- sql-server - SQL Server 在生成大约 6000 万条记录后总是关闭