묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
[질문]네트워크카메라 영상 플래시삽입(자바스크립트)
2007.09.06 18:28
아래와 같은...
HTML용 네트워크 카메라 영상소스가 있습니다.
플래시 파일내에 영상을 넣으려고 하는데요.
아래같은 자바스크립트는 어떻게 넣어야 하는지.....
혹, 아시는분 계시면 답변 부탁드립니다. ㅜㅜ
미리, 감사합니다 ^^;
<SCRIPT LANGUAGE="JavaScript">
var BaseURL = "카메라-IP어드레스";
var DisplayWidth = "100%";
var DisplayHeight = "100%";
var File = "axis-cgi/mjpg/video.cgi?resolution=CIF";
var PTZFile = "axis-cgi/com/ptz.cgi?camera=1";
var output = "";
if ((navigator.appName == "Microsoft Internet Explorer") &&
(navigator.platform != "MacPPC") && (navigator.platform != "Mac68k"))
{
output = '<OBJECT ID="Player" width='
output += DisplayWidth;
output += ' height=';
output += DisplayHeight;
output += ' CLASSID="CLSID:DE625294-70E6-45ED-B895-CFFA13AEB044" ';
output += 'CODEBASE="';
output += BaseURL;
output += '/activex/AMC.cab#version=3,32,14,0">';
output += '<PARAM NAME="MediaURL" VALUE="';
output += BaseURL;
output += File + '">'+ '+ ';
output += '<param name="MediaType" value="mjpeg-unicast">';
output += '<param name="ShowStatusBar" value="0">';
output += '<param name="ShowToolbar" value="0">';
output += '<param name="AutoStart" value="1">';
output += '<param name="StretchToFit" value="1">';
output += '<BR><B>Axis Media Control</B><BR>';
output += 'The AXIS Media Control, which enables you ';
output += 'to view live image streams in Microsoft Internet';
output += ' Explorer, could not be registered on your computer.';
output += '<BR></OBJECT>';
} else {
theDate = new Date();
output = '<IMG SRC="';
output += BaseURL;
output += File;
output += '&dummy=' + theDate.getTime().toString(10);
output += '" HEIGHT="';
output += DisplayHeight;
output += '" WIDTH="';
output += DisplayWidth;
output += '" ALT="Camera Image">';
}
document.write(output);
document.Player.ToolbarConfiguration = "+play,+snapshot,+fullscreen";
</SCRIPT>
HTML용 네트워크 카메라 영상소스가 있습니다.
플래시 파일내에 영상을 넣으려고 하는데요.
아래같은 자바스크립트는 어떻게 넣어야 하는지.....
혹, 아시는분 계시면 답변 부탁드립니다. ㅜㅜ
미리, 감사합니다 ^^;
<SCRIPT LANGUAGE="JavaScript">
var BaseURL = "카메라-IP어드레스";
var DisplayWidth = "100%";
var DisplayHeight = "100%";
var File = "axis-cgi/mjpg/video.cgi?resolution=CIF";
var PTZFile = "axis-cgi/com/ptz.cgi?camera=1";
var output = "";
if ((navigator.appName == "Microsoft Internet Explorer") &&
(navigator.platform != "MacPPC") && (navigator.platform != "Mac68k"))
{
output = '<OBJECT ID="Player" width='
output += DisplayWidth;
output += ' height=';
output += DisplayHeight;
output += ' CLASSID="CLSID:DE625294-70E6-45ED-B895-CFFA13AEB044" ';
output += 'CODEBASE="';
output += BaseURL;
output += '/activex/AMC.cab#version=3,32,14,0">';
output += '<PARAM NAME="MediaURL" VALUE="';
output += BaseURL;
output += File + '">'+ '+ ';
output += '<param name="MediaType" value="mjpeg-unicast">';
output += '<param name="ShowStatusBar" value="0">';
output += '<param name="ShowToolbar" value="0">';
output += '<param name="AutoStart" value="1">';
output += '<param name="StretchToFit" value="1">';
output += '<BR><B>Axis Media Control</B><BR>';
output += 'The AXIS Media Control, which enables you ';
output += 'to view live image streams in Microsoft Internet';
output += ' Explorer, could not be registered on your computer.';
output += '<BR></OBJECT>';
} else {
theDate = new Date();
output = '<IMG SRC="';
output += BaseURL;
output += File;
output += '&dummy=' + theDate.getTime().toString(10);
output += '" HEIGHT="';
output += DisplayHeight;
output += '" WIDTH="';
output += DisplayWidth;
output += '" ALT="Camera Image">';
}
document.write(output);
document.Player.ToolbarConfiguration = "+play,+snapshot,+fullscreen";
</SCRIPT>