Flash——视频孩子不会播放
你好,我创建了一个简单的 p2p 会议工具,但我有 1 个主要问题。我可以发送流,我知道我收到流(我可以听到声音),但视频无法播放。我不知道为什么。 视频 myvideo 相关的代码
private function initconnect():void{
//test with UiElement
myvideo = new Video(320,240);
myvideo.x = 10;
myvideo.y = 50;
var uic:UIComponent = new UIComponent();
uic.addChild(myvideo);
addElement(uic);
othervideo = new Video(320,240);
othervideo.x = 10;
othervideo.y = 310;
var uic2:UIComponent = new UIComponent();
uic2.addChild(myvideo);
addElement(uic2);
下面是与屏幕上可以看到的 。但当我去接收视频时却什么也没得到。
public function receive():void{
recvid = new NetStream(netconn,farpeerid);
recvid.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler);
recvid.play("cam");
othervideo.attachNetStream(recvid);
}
Hello I have created a simple p2p conference tool, but I have 1 major problem. I can send the stream, I know I receive the stream( I can hear the sound) but the Video will not play. I don't know why. Below is the code related to the video
private function initconnect():void{
//test with UiElement
myvideo = new Video(320,240);
myvideo.x = 10;
myvideo.y = 50;
var uic:UIComponent = new UIComponent();
uic.addChild(myvideo);
addElement(uic);
othervideo = new Video(320,240);
othervideo.x = 10;
othervideo.y = 310;
var uic2:UIComponent = new UIComponent();
uic2.addChild(myvideo);
addElement(uic2);
myvideo can be seen on the screen. But when I go to receive the video I get nothing.
public function receive():void{
recvid = new NetStream(netconn,farpeerid);
recvid.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler);
recvid.play("cam");
othervideo.attachNetStream(recvid);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
注意这个论点。
Try
Notice the argument.