[英]Video not streaming
I wrote a simple webapp for a huge amount of streamers.我为大量流媒体编写了一个简单的 web 应用程序。 The streams are stable but audio/video not showing up.
流是稳定的,但音频/视频不显示。
Maybe you have a clue why.也许你知道为什么。
See https://github.com/enexusde/Maven-Many-Videomeeting-RTC-OnlineServlet3.0见https://github.com/enexusde/Maven-Many-Videomeeting-RTC-OnlineServlet3.0
To start the app simply write mvn
in the console, all goals are used from the maven defaultGoal.要启动应用程序,只需在控制台中编写
mvn
,所有目标都使用 maven 默认目标。
Then start two browser tabs having the url http://localhost:8080/vc/.然后启动两个具有 url http://localhost:8080/vc/ 的浏览器选项卡。
Regards问候
I've forked and modified your project on GitHub.我已经在 GitHub 上分叉并修改了您的项目。 Working code and setup instructions can be found here .
工作代码和设置说明可以在这里找到。
Here is how it looks with 4 tabs open.这是打开 4 个选项卡后的外观。 You can see local session id on top right and corresponding sessions ids on each remote videos.
您可以在右上角看到本地 session id,并在每个远程视频上看到相应的会话 id。 I used VCam for debugging.
我使用VCam进行调试。 That's why the trial text:
这就是为什么试用文本:
There are some issues to fix:有一些问题需要解决:
if (y != "complete")
.if (y != "complete")
。 You are comparing event object with "complete" string.if (self.peerConn.iceGatheringState === "complete")
ref fixes part of the problem.if (self.peerConn.iceGatheringState === "complete")
ref修复了部分问题。 With this change Receiver sees the Sender's video.createAnswer()
or createOffer()
. createAnswer()
或createOffer()
后启动。 So you are sending SDP without any ICE candidates.onAddStream
and streamEventsChangedHandler
handlers.onAddStream
和streamEventsChangedHandler
处理程序。 Thus Sender never gets to set received stream to corresponding <video>
element.<video>
元素。setRemoteDescription()
on Sender as well.setRemoteDescription()
。 You don't have to maintain separate Sender and Receiver connection objects.RTCPeerConnection.onaddstream
is deprecated . RTCPeerConnection.onaddstream
已弃用。 Use RTCPeerConnection.ontrack
propertyRTCPeerConnection.ontrack
属性tomcat7-maven-plugin
in pom.xml to serve pages on HTTPs.tomcat7-maven-plugin
以在 HTTPs 上提供页面。 Steps to setup HTTPs are in the README.md file.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.