JVC VN-E4U API Guide - Page 77

(1) HTML Sample, <INPUT TYPE=BUTTON NAME=still_btn VALUE=Pause

Page 77 highlights

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 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); } } SAMPLE TEXT 77

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80

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>