简体   繁体   English

WebRTC,远程stream无法使用,如何检查它是否正常工作(ReactJs)?

[英]WebRTC, remote stream can't be used, how to check if it's working (ReactJs)?

I've been working on a webRTC based video calling app, using react js and socket.io. first, it was stuck on negotiation needed, then later on I added event handlers to handle those events and followed the steps mentioned here: https://webrtc.org/getting-started/overview .我一直在开发一个基于 webRTC 的视频通话应用程序,使用 react js 和 socket.io。首先,它停留在需要协商上,后来我添加了事件处理程序来处理这些事件,并按照此处提到的步骤操作: https:// webrtc.org/getting-started/overview I can see my own stream but nothing shows up for the remote stream, The streams are basically set in state and are MediaStream objects which are played by react-player.我可以看到我自己的 stream 但没有显示远程 stream,流基本上设置在 state 并且是由 react-player 播放的 MediaStream 对象。 I've set add track on the callee side also, the connection is established and we can get the remote stream id too.我也在被叫方设置了添加轨道,连接建立,我们也可以获得远程 stream id。 Still can't get anything to play, a screenshot of chrome://webrtcinternals is attached here .仍然无法播放任何内容,此处附上chrome://webrtcinternals 的屏幕截图。

I've tried to play it without react-player, still have the same issue.我试过在没有 react-player 的情况下玩它,仍然有同样的问题。 on using useRef it's the same, nothing shows up on the remote stream. how to make sure that the stream is being transmitted, also the stream inside the console log shows up as active在使用 useRef 时是一样的,远程 stream 上没有显示任何内容。如何确保正在传输 stream,控制台日志中的 stream 也显示为活动状态

for those struggling with this issue, check if your browser is gathering ice candidates.对于那些为这个问题苦苦挣扎的人,请检查您的浏览器是否正在收集 ice candidates。 for some reason unknown, it wasn't working with Brave browser, so I switched to firefox and it started playing.由于某种未知原因,它无法与 Brave 浏览器一起使用,所以我切换到 firefox 并开始播放。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM