diff options
author | thlo <t.lohmar@gmx.de> | 2012-12-27 22:24:51 +0100 |
---|---|---|
committer | thlo <t.lohmar@gmx.de> | 2012-12-27 22:24:51 +0100 |
commit | 19e18001a906b75fd7383291307e72eca14d70b2 (patch) | |
tree | 6251cc36e54ce5e8da71d885f85bc53edbc72bb4 /smarttv-client/Javascript/Network.js | |
parent | 3249a09d4239dbc7b5cbce53f611014d8c89b0d4 (diff) | |
download | vdr-plugin-smarttvweb-19e18001a906b75fd7383291307e72eca14d70b2.tar.gz vdr-plugin-smarttvweb-19e18001a906b75fd7383291307e72eca14d70b2.tar.bz2 |
Increase robustness (main part of code runs in chrome now). Bug fixes.
Diffstat (limited to 'smarttv-client/Javascript/Network.js')
-rwxr-xr-x | smarttv-client/Javascript/Network.js | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/smarttv-client/Javascript/Network.js b/smarttv-client/Javascript/Network.js index 1dfcafc..b4c0772 100755 --- a/smarttv-client/Javascript/Network.js +++ b/smarttv-client/Javascript/Network.js @@ -1,18 +1,25 @@ var Network = {
plugin : null,
ownMac : "",
- ownGw : ""
+ ownGw : "",
+ isInited: false
};
Network.init = function () {
this.plugin = document.getElementById("pluginNetwork");
- var nw_type = this.plugin.GetActiveType();
- if ((nw_type == 0) || (nw_type == 1)) {
- this.ownMac = this.plugin.GetMAC(nw_type);
- this.ownGw = this.plugin.GetGateway(nw_type);
+ try {
+ var nw_type = this.plugin.GetActiveType();
+ if ((nw_type == 0) || (nw_type == 1)) {
+ this.ownMac = this.plugin.GetMAC(nw_type);
+ this.ownGw = this.plugin.GetGateway(nw_type);
+ }
+ Main.log( "ownMac= " + this.ownMac);
+ Main.log ("ownGw= " + this.ownGw);
+ this.isInited = true;
+ }
+ catch (e) {
+ // Code for Non Samsung SmartTV here
}
- alert( "ownMac= " + this.ownMac);
- alert ("ownGw= " + this.ownGw);
} ;
|