summaryrefslogtreecommitdiff
path: root/smarttv-client/Javascript/Comm.js
diff options
context:
space:
mode:
authorthlo <t.lohmar@gmx.de>2013-07-24 20:32:03 +0200
committerthlo <t.lohmar@gmx.de>2013-07-24 20:32:03 +0200
commit66d5e7f95f2f1c3c51bd73f86466a8bd2f16fbc7 (patch)
tree3e8d88ad1c84e9f537d1fa8853ddd00f200760d0 /smarttv-client/Javascript/Comm.js
parentc47e5227a1d1f47f74c67bc6b2d70b5f57e34339 (diff)
downloadvdr-plugin-smarttvweb-66d5e7f95f2f1c3c51bd73f86466a8bd2f16fbc7.tar.gz
vdr-plugin-smarttvweb-66d5e7f95f2f1c3c51bd73f86466a8bd2f16fbc7.tar.bz2
Widget updates:
- Multi-Server Support - Number key personalization for recordings - Timezone fix - Fix in YouTube Handling - Fix in Helpbar - Other misc fixes
Diffstat (limited to 'smarttv-client/Javascript/Comm.js')
-rw-r--r--smarttv-client/Javascript/Comm.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/smarttv-client/Javascript/Comm.js b/smarttv-client/Javascript/Comm.js
index 8c87af6..eb548a2 100644
--- a/smarttv-client/Javascript/Comm.js
+++ b/smarttv-client/Javascript/Comm.js
@@ -1,10 +1,16 @@
var Comm = {
+ created: false,
customMgr : {},
deviceInstance : []
};
Comm.init = function () {
+ if (this.created == true) {
+ return;
+ }
+
+ this.created = true;
// >> Register custom manager callback to receive device connect and disconnect events
Comm.customMgr = webapis.customdevice || {};
@@ -16,6 +22,8 @@ Comm.init = function () {
Main.logToServer("curWidget.id= (" + curWidget.id+")");
};
+//TODO: I should ensure that I take only events from the selected VDR server
+
Comm.onDeviceStatusChange = function (sParam) {
switch( Number(sParam.eventType) ) {
case Comm.customMgr.MGR_EVENT_DEV_CONNECT:
@@ -32,10 +40,10 @@ Comm.onDeviceStatusChange = function (sParam) {
};
Comm.onCustomObtained = function (customs) {
- Main.logToServer("onCustomObtained - found " + customs.length + " custom device(s)");
+// Main.logToServer("onCustomObtained - found " + customs.length + " custom device(s)");
for(var i=0; i<customs.length; i++) {
if(customs[i]!=null && customs[i].getType() == Comm.customMgr.DEV_SMART_DEVICE) {
- Main.logToServer("onCustomObtained - is Comm.custom.DEV_SMART_DEVICE: i=" + i);
+// Main.logToServer("onCustomObtained - is Comm.custom.DEV_SMART_DEVICE: i=" + i);
Comm.deviceInstance[i] = customs[i];
Comm.deviceInstance[i].registerDeviceCallback(Comm.onDeviceEvent);
}
@@ -138,6 +146,9 @@ Comm.onMessageReceived = function(message, context) {
}
break;
+ case "MESG":
+ Notify.showNotify(msg.payload, true);
+ break;
}; // switch