最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
用 flashmediaserver 做在线视频录音
时间:2022-07-02 17:08:09 编辑:袖梨 来源:一聚教程网
用 flashmediaserver 非常好实现的
给你几段AS代码吧.
播放
nc = new NetConnection();
nc.connect("rtmp://127.0.0.1/cam02");
res = new NetStream(nc);
view.attachVideo(res);
view.attachAudio(res);
res.play("2");
录象
var cam = Camera.get();
if (cam == null)
{
nocamerror.text = "没有摄像头n或设备正被占用中";
}
else
{
//从麦和设像头显示视频
my_video.attachVideo(cam);
my_video.attachAudio(Microphone.get());
//连接
nc = new NetConnection();
nc.connect("rtmp://127.0.0.1/flash");
nsOut = new NetStream(nc);
nsOut.attachVideo(cam);
nsOut.attachAudio(Microphone.get());
//发布2.flv
nsOut.publish("2");
}
播放
nc = new NetConnection();
nc.connect("rtmp://127.0.0.1/cam02");
res = new NetStream(nc);
view.attachVideo(res);
view.attachAudio(res);
res.play("2");
录象
var cam = Camera.get();
if (cam == null)
{
nocamerror.text = "没有摄像头n或设备正被占用中";
}
else
{
//从麦和设像头显示视频
my_video.attachVideo(cam);
my_video.attachAudio(Microphone.get());
//连接
nc = new NetConnection();
nc.connect("rtmp://127.0.0.1/flash");
nsOut = new NetStream(nc);
nsOut.attachVideo(cam);
nsOut.attachAudio(Microphone.get());
//发布2.flv
nsOut.publish("2");
}
相关文章
- 《无限暖暖》天星之羽获得位置介绍 12-20
- 《流放之路2》重铸台解锁方法介绍 12-20
- 《无限暖暖》瞄准那个亮亮的成就怎么做 12-20
- 《无限暖暖》魔气怪终结者完成方法 12-20
- 《无限暖暖》曙光毛团获得位置介绍 12-20
- 《无限暖暖》日光果获得位置介绍 12-20