To install the flashcom test version, download it from media.
The Code is as follows:
[Jasoft. aspx]
<% @ Language = "C #" %>
<SCRIPT runat = "server">
Private void page_load (Object sender, system. eventargs E)
{
Response. Write ("conn = 1 & sendid =" + session ["Ziyan"] + "& recvid =" + session ["Sammi"]);
}
</SCRIPT>
[View. aspx]
<% @ Page Language = "C #" %>
<SCRIPT runat = "server">
Private void page_load (Object sender, system. eventargs E)
{
Session ["Ziyan"] = request. querystring ["recvid"];
Session ["Sammi"] = request. querystring ["sendid"];
}
</SCRIPT>
<HTML>
<Head>
<Meta http-equiv = "content-language" content = "ZH-CN">
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> untitled document </title>
</Head>
<Body leftmargin = "0" topmargin = "0" marginwidth = "0" marginheight = "0">
<Div align = "center">
<Object classid = "CLSID: D27CDB6E-AE6D-11cf-96B8-44553540000"
Codebase = http://download.macromedia.com/pub/shockwave
/Cabs/flash/swflash. Cab # version = 6, 0, 500 width = "500" Height = "">
<Param name = "menu" value = "false">
<Param name = "movie" value = "jasoft.swf">
<Param name = "quality" value = "high">
<Embed src = "jasoft.swf" Quality = "high" pluginspage =
Http://www.macromedia.com/go/getflashplayer
Type = "application/X-Shockwave-flash" width = "500" Height = "500"> </embed> </Object>
</Div>
</Body>
</Html>
[Jasoft. SWF]
Stop ();
Mycam = camera. Get ();
Myvideoobject. attachvideo (mycam );
Mycam. onstatus = function (infomsg ){
If (infomsg. Code = "camera. muted "){
_ Root. A. Text = "User denies access to the camera ";
}
Else
System. showsettings (0 );
}
Client_nc = new netconnection ();
Client_nc.onstatus = function (Info ){
Trace ("level:" + info. Level + newline + "Code:" + info. Code );
_ Root. ABC. Text = "level:" + info. Level + newline + "Code:" + info. Code;
};
Client_nc.connect ("rtmp: // 192.168.25.18/record_video ");
Rec_so = export dobject. getremote ("myvideo", client_nc.uri, true );
Rec_so.connect (client_nc );
VaR recvid;
VaR sendid;
GETID ();
Function Recv (){
In_ns = new netstream (client_nc );
In_ns.play (recvid );
_ Root. B. attachvideo (in_ns );
}
Function send (){
This. Cam = camera. Get ();
This. MIC = microphone. Get ();
Out_ns = new netstream (client_nc );
Out_ns.attachvideo (this. Cam );
_ Root. A. attachvideo (this. Cam );
Out_ns.attachaudio (this. Mic );
Out_ns.publish (sendid, "live ");
}
Function GETID (){
Myload = new loadvars ();
Myload. Action = "Post ";
Myload. onload = function (SUCCESS ){
If (SUCCESS ){
If (this. Conn = "1 "){
_ Root. recvid = This. recvid;
_ Root. sendid = This. sendid;
Send ();
Recv ();
_ Root. ABC. Text = 'OK ...';
}
} Else {
// If the connection to the server is unsuccessful, a failure message is returned. Check whether the path is correct.
_ Root. ABC. Text = 'Connection failed ....';
}
};
Myload. sendandload ("http: // 192.168.25.18/ASP. NET/jasoft. aspx", myload, "Post ");
}