最新下载
热门教程
- 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");
}
相关文章
- 《彩色点点战争》推图常用三大主c玩法详解 01-23
- 《燕云十六声》池鱼林木任务攻略 01-23
- 《大连地铁e出行》查看行程记录方法 01-23
- 《明日方舟》2025春节限定干员余角色介绍 01-23
- 《崩坏:星穹铁道》万敌光锥搭配攻略 01-23
- 《燕云十六声》一药千金任务攻略 01-23