Electron-SDK icon indicating copy to clipboard operation
Electron-SDK copied to clipboard

electron版本 多个渲染进程如何视频渲染管理

Open github-chenzhou opened this issue 5 years ago • 11 comments

electron版本 多个渲染进程如何视频渲染管理

github-chenzhou avatar Oct 06 '20 10:10 github-chenzhou

多个渲染进程的目的是?是指渲染多个远端视图么?

yoreland avatar Oct 09 '20 02:10 yoreland

是的 多个渲染进程 都需要显示展示远端视图或者本地视图

github-chenzhou avatar Oct 09 '20 02:10 github-chenzhou

多个渲染进程的目的是?是指渲染多个远端视图么? 是的 多个渲染进程 都需要显示展示远端视图或者本地视图

github-chenzhou avatar Oct 09 '20 02:10 github-chenzhou

目前没有找个合适的API 处理 感觉还是应该一个rtc实例实现吧 创建多个实例 应该不可取吧

多个渲染进程的目的是?是指渲染多个远端视图么? 是的 多个渲染进程 都需要显示展示远端视图或者本地视图

github-chenzhou avatar Oct 09 '20 03:10 github-chenzhou

是否已参考过demo https://github.com/AgoraIO-Community/Agora-Electron-Quickstart/ 可以通过如下的方式在渲染远端视图,不需要多进程,或者多rtc实例 rtcEngine.on('userJoined', (uid) => { //setup render area for joined user let remoteVideoContainer = document.querySelector('#remote') rtcEngine.setupViewContentMode(uid, 1); rtcEngine.subscribe(uid, remoteVideoContainer) })

yoreland avatar Oct 09 '20 08:10 yoreland

是否已参考过demo https://github.com/AgoraIO-Community/Agora-Electron-Quickstart/ 可以通过如下的方式在渲染远端视图,不需要多进程,或者多rtc实例 rtcEngine.on('userJoined', (uid) => { //setup render area for joined user let remoteVideoContainer = document.querySelector('#remote') rtcEngine.setupViewContentMode(uid, 1); rtcEngine.subscribe(uid, remoteVideoContainer) })

参考过 我的意思 electron有两个窗体 也就是两个渲染进程 这个两个窗体都需要来订阅渲染远端视图和本地视图 没办法用一个rtc实例实现 不知道这种应该怎么处理 请问这种需求应该怎么来实现

github-chenzhou avatar Oct 09 '20 09:10 github-chenzhou

这样的话,另一个进程通过rtc实例加入频道subscribe对应的uid就可以了

yoreland avatar Oct 09 '20 09:10 yoreland

这样的话,另一个进程通过rtc实例加入频道subscribe对应的uid就可以了

我们目前也是这么实现的但是 同时两个rtc实例 不清楚会不会引起啥问题 目前发现有时候windows下打开本地视图没有渲染 监听的userMuteVideo 和 userMuteAudio 也貌似不是很准确

github-chenzhou avatar Oct 09 '20 09:10 github-chenzhou

双rtc实例只要注意本地资源的冲突就可以了,理论上子进程如果是作为渲染远端视图(不发流)使用的话,是没有问题的.

userMuteAudio userMuteVideo如果3.0之后是deprecated api,是否用过onRemoteAudioStateChanged?

yoreland avatar Oct 09 '20 10:10 yoreland

双rtc实例只要注意本地资源的冲突就可以了,理论上子进程如果是作为渲染远端视图(不发流)使用的话,是没有问题的.

userMuteAudio userMuteVideo如果3.0之后是deprecated api,是否用过onRemoteAudioStateChanged?

这里还有个问题就是双rtc实例 如果用UserAccount方式加入频道 会生成两个uid 远端也会触发两个userJoined 不知道有啥建议吗

github-chenzhou avatar Oct 12 '20 10:10 github-chenzhou

userJoined触发应该没关系,如果子进程的uid只渲染,不发流,不会触发远端的onFirstRemoteVideoFrame之类的回调

yoreland avatar Oct 13 '20 08:10 yoreland

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 14 '23 15:03 stale[bot]