77
11. Customizing VN-E4's Built-in Viewer
The built-in viewer of VN-E4 consists of an ActiveX control, and customization is possible using HTML description.
(1) HTML Sample
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<TITLE></TITLE>
</HEAD>
<SCRIPT LANGUAGE=JAVASCRIPT>
function stop_click() {
Viewer.Stop();
}
function play_click() {
Viewer.Play();
}
function ch_click(obj,num){
Viewer.SelectCh = num;
if(num==5){
Viewer.DispFore();
}else{
Viewer.DispOne();
}
}
function still_click(obj,num)
{
if(obj.value==" Play "){
obj.value="Pause";
Viewer.SetStill(num,0);
}else{
obj.value=" Play ";
Viewer.SetStill(num,1);
}
}
</SCRIPT>
<BODY STYLE="font-family:sans-serif;" onBeforeUnload="stop_click()" onload="play_click()">
<font size="6"> SAMPLE TEXT </font><br>
<OBJECT ID="Viewer"
WIDTH = 641
HEIGHT= 481
CLASSID="CLSID:E6BE5699-64A1-4024-BB79-27C00553ECD6"
STYLE="border-style:solid;border:1px;border-color:#ffffff;">
<PARAM NAME="ApiIP" VALUE="192.168.0.2">
<PARAM NAME="ApiPort" VALUE="8009">
<PARAM NAME="AudioSnd" VALUE="1">
<PARAM NAME="AudioRcv" VALUE="1">
<PARAM NAME="StartMode" VALUE="2">
<PARAM NAME="SelectCh" VALUE="1">
</OBJECT>
<form name="myForm">
<table><tr><td>
<INPUT TYPE="BUTTON" NAME="ch_btn" VALUE=" CH1 " onclick="ch_click(this,1)"></td><td>
<INPUT TYPE="BUTTON" NAME="ch_btn" VALUE=" CH2 " onclick="ch_click(this,2)"></td><td>
<INPUT TYPE="BUTTON" NAME="ch_btn" VALUE=" CH3 " onclick="ch_click(this,3)"></td><td>
<INPUT TYPE="BUTTON" NAME="ch_btn" VALUE=" CH4 " onclick="ch_click(this,4)"></td><td>
<INPUT TYPE="BUTTON" NAME="allch_btn" VALUE=" All " onclick="ch_click(this,5)"></td></
tr><tr><td>
<INPUT TYPE="BUTTON" NAME="still_btn" VALUE="Pause" onclick="still_click(this,1)"></td><td>
<INPUT TYPE="BUTTON" NAME="still_btn" VALUE="Pause" onclick="still_click(this,2)"></td><td>
<INPUT TYPE="BUTTON" NAME="still_btn" VALUE="Pause" onclick="still_click(this,3)"></td><td>
<INPUT TYPE="BUTTON" NAME="still_btn" VALUE="Pause" onclick="still_click(this,4)"></td><td>
</tr></table>
</form></BODY></HTML>