-
getHost() no workie
i am trying to use a function to create the url for each stream video player..
from up to 16 cameras.. such as: "mms://74.56.123.45:2021"
cant get getHost() to do anything..any help much appreciated..
here is the relevant code from my html:
function FP_getHostIP(cam) {//v1.0
var s_url="0.0.0.0";
s_url=url.getHost();
alert('here2');
return s_url + ":" + cam;
}
<OBJECT ID="MediaPlayer" WIDTH=320 HEIGHT=331 CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="FP_getHostIP(1)">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="true">
<PARAM name="ShowDisplay" VALUE="true">
<PARAM name="autostart" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="FP_getHostIP(1)" NAME="MediaPlayer" WIDTH=320 HEIGHT=331 ShowControls="1" ShowStatusBar="1" ShowDisplay="1" autostart="0"> </EMBED>
</OBJECT>
-
function FP_getHostIP(cam) {//v1.0
if(navigator.javaEnabled() && (navigator.appName != "Microsoft Internet Explorer")) {
vartool=java.awt.Toolkit.getDefaultToolkit();
addr=java.net.URL.getHost();
host=addr.getHostName();
ip=addr.getHostAddress();
prt=addr.getHostPort();
alert("Your host name is '" + host + "'\nYour IP address is " + ip);
}
this code fails at :addr=java.net.URL.getHost();
any help thanks