如何更改视频对象为大家同时更改音频对象为所选这个人
function loadYinpin()
{
nsOut.close();
my_video.attachCamera(Camera.getCamera());
client_cam.setMotionLevel(100);
client_cam.setMode(v_w, v_h, v_z);
client_cam.setQuality(v_b, v_c
trace("LL:"+v_w+v_h+v_z+v_b+ v_c);
nsOut = new NetStream(mync);
var Send3 = {};
Send3.fromID = _idname;
Send3.toID=mylist.selectedItem.label.split('@')[0];
Send3.func = "showPrivateYP";
Send3.info_ = "视频大家"; //信息
Send3.type_ = "public";//类型
Send3.condition = "大家";//和谁私聊
mync.call("reCall", null, Send3);
nsOut.attachCamera(client_cam);
//nsOut.attachAudio(Microphone.getMicrophone());
nsOut.publish(_idname+"live", "live");
//以上调试没问题(可以实现 视频对象为大家且没有声音)
//以下就是问题(出现 TypeError: Error #1006: value 不是函数。)
//我想将我选中这个人的音频给加上,该怎么解决呐!!!
nsOut=new NetStream(mync);
nsOut.attachAudio(Microphone.getMicrophone());
var Send4 = {};
Send4.fromID = _idname;
Send4.toID=mylist.selectedItem.label.split('@')[0];
Send4.func = "showPrivateYP";
Send4.info_ = "音频私聊"; //信息
Send4.type_ = "private";//类型
Send4.condition = mylist.selectedItem.label;//和谁私聊
mync.call("reCall", null, Send4);
nsOut.publish(_idname+"liveYP"+mylist.selectedItem.label.split('@')[0].ToString(), "live");
}
[解决办法]
是“ToString()”的原因吗,这类提示一般就是有函数名称不对。