最新下载
热门教程
- 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");
}
相关文章
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21
- 《潜行者2:切尔诺贝利之心》使用手电筒方法介绍 11-21