summaryrefslogtreecommitdiff
path: root/smarttv-client/Javascript/Network.js
diff options
context:
space:
mode:
Diffstat (limited to 'smarttv-client/Javascript/Network.js')
-rwxr-xr-xsmarttv-client/Javascript/Network.js21
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);
} ;