简体   繁体   English

Chrome上的Webrtc音频自动播放

[英]Webrtc Audio Autoplaying On Chrome

I have webrtc working in a webapp but it seems that when connections are established between Chrome browsers the audio is not played, while video is. 我在webapp中使用了webrtc,但似乎在Chrome浏览器之间建立连接时,音频不会播放,而视频却可以播放。 This however doesn't apply to Mozilla users. 但是,这不适用于Mozilla用户。 So... 所以...

Chrome user 1 -> Chrome user 2 = plays video but not audo Chrome用户1-> Chrome用户2 =播放视频,但不播放audo
Chrome user 1 -> Mozilla user 1 = plays audio and video Chrome用户1-> Mozilla用户1 =播放音频和视频
Mozilla user 1 -> Chrome user 1 = plays audio and video Mozilla用户1-> Chrome用户1 =播放音频和视频
Mozilla user 1 - Chrome user 2 = plays audio and video Mozilla用户1-Chrome用户2 =播放音频和视频
Mozilla user 1 -> Mozilla user 2 = plays audio and video Mozilla用户1-> Mozilla用户2 =播放音频和视频

Based on this I'm confused as to why this would happen as there doesn't seem to be problems with the stream (both audio and video tracks are sent through and both are enabled). 基于此,我对为什么会发生这种情况感到困惑,因为流似乎没有问题(音频和视频轨道都通过发送,并且都启用了)。 This is my video tag that plays it afterwards 这是我随后播放的视频标签

<video src={{stream.src}} id={{stream.id}} autoplay></video>

When doing the communication test of "Chrome user 1 -> Chrome user 2" , can you please check any error from both browsers ? 在进行“ Chrome用户1-> Chrome用户2”的通讯测试时,能否请您检查两个浏览器的任何错误? You can do this by right click and select Inspect button from both browsers when communicate is on. 您可以通过右键单击并在打开通讯时从两个浏览器中选择“检查”按钮来执行此操作。 If there's any error can you please post it to here? 如果有任何错误,您可以将其发布到这里吗?

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

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