Channel switching page¶
The test page, allowing to switch playback between one of several channels from the panel.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf8" />
<script type="text/javascript">
WRT.SetAlphaLevel(80);
WRT.SetInRect(0,0,720,560);
WRT.SetVideoMode(WRT.GetAspectRatio(), WRT.GetVideoFormat());
WRT.SetChromaKey(526352);
lastId=0;
function onEvent(){
str = WRT.EventString;
if (WRT.Event == 20) {
str = str + ": " + WRT.UpdateProgress + "%";
}
document.getElementById("event").innerHTML=str;
}
// Add some urls for mcast/ucast playing
function keypressed(event) {
switch (event.keyCode) {
case 49: WRT.Play("http://81.9.48.11:8080/udp/233.0.0.43:1234"); break;//key 1
case 50: WRT.Play("http://81.9.48.11:8080/udp/233.0.0.10:1234"); break;//key 2
case 51: WRT.Play("http://81.9.48.11:8080/udp/233.0.0.37:1234"); break;//key 3
case 52: WRT.Play("http://81.9.48.11:8080/udp/234.5.2.51:20000"); break;//key 4
case 53: WRT.Play("igmp://239.98.1.34:1234"); break;//key 5
case 54: WRT.Play("igmp://239.98.1.10:1234"); break;//key 6
}
}
</script>
</head>
<body onkeypress="keypressed(event);" style="padding:200px;background:#080810">
<div id='content' style="width:30%;height:25%;background:white;">
<script type="text/javascript">
document.write("<em>MAC:</em> "+WRT.GetMacAddress());
document.write("<br>");
document.write("<em>IP:</em> "+WRT.GetIPAddress());
document.write("<br>");
document.write("<em>Software Version:</em> "+WRT.GetSoftwareVersion());
</script>
</div>
<div id="event" style="width:30%;height:25%;background:white;">event</div>
</body>
</html>