summaryrefslogtreecommitdiff
path: root/smarttv-client/Javascript/Main.js
diff options
context:
space:
mode:
authorthlo <smarttv640@gmail.com>2012-12-26 21:58:29 +0100
committerthlo <t.lohmar@gmx.de>2012-12-26 21:58:29 +0100
commit527ee6674d0b82747b9cd39a530bc8f23522c304 (patch)
tree74fbd46619d105905f76c6a679ed614406a1b2c3 /smarttv-client/Javascript/Main.js
parentb92b1fc101a5a5ba8bb212e7bebc31ccc94f8dc1 (diff)
downloadvdr-plugin-smarttvweb-527ee6674d0b82747b9cd39a530bc8f23522c304.tar.gz
vdr-plugin-smarttvweb-527ee6674d0b82747b9cd39a530bc8f23522c304.tar.bz2
Fixes and improvements of initial widget configuration.
Diffstat (limited to 'smarttv-client/Javascript/Main.js')
-rwxr-xr-xsmarttv-client/Javascript/Main.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/smarttv-client/Javascript/Main.js b/smarttv-client/Javascript/Main.js
index ef92172..fa3c863 100755
--- a/smarttv-client/Javascript/Main.js
+++ b/smarttv-client/Javascript/Main.js
@@ -38,8 +38,6 @@ var Main = {
};
Main.onLoad = function() {
-
-// Config.init("http://192.168.1.122:8000/widget.conf");
Network.init();
Display.init();
@@ -55,6 +53,7 @@ Main.onLoad = function() {
};
// Called by Config, when done
+// TODO: Send sendReadyEvent early and show a splash screen during startup
Main.init = function () {
alert("Main.init()");
if ( Player.init() && Audio.init() && Server.init() ) {
@@ -77,7 +76,7 @@ Main.init = function () {
document.getElementById("splashScreen").style.display="none";
- widgetAPI.sendReadyEvent();
+ widgetAPI.sendReadyEvent();
}
else {
alert("Failed to initialise");
@@ -86,7 +85,10 @@ Main.init = function () {
};
Main.log = function (msg) {
- var XHRObj = new XMLHttpRequest();
+ if (Config.serverUrl == "" )
+ return;
+
+ var XHRObj = new XMLHttpRequest();
XHRObj.open("POST", Config.serverUrl + "/log", true);
XHRObj.send("CLOG: " + msg);
};