summaryrefslogtreecommitdiff
path: root/smarttv-client/Javascript/Main.js
diff options
context:
space:
mode:
authorthlo <t.lohmar@gmx.de>2013-08-27 22:08:08 +0200
committerthlo <t.lohmar@gmx.de>2013-08-27 22:08:08 +0200
commit68de2c4bdab84ae56ddad0db48c48b40f0ca536c (patch)
tree7884c091d5b94731781b1ff9be587b26c5131f0c /smarttv-client/Javascript/Main.js
parent685ba9d97e9ca4ef8f197c62e07a85cb0901be7a (diff)
downloadvdr-plugin-smarttvweb-68de2c4bdab84ae56ddad0db48c48b40f0ca536c.tar.gz
vdr-plugin-smarttvweb-68de2c4bdab84ae56ddad0db48c48b40f0ca536c.tar.bz2
New Overlay Menu for RecCmd Handling
Make YouTube entry optional (Select Screen option is configurable through widget.conf) First 3D iter function for 3D TVs and 3D BDs.
Diffstat (limited to 'smarttv-client/Javascript/Main.js')
-rwxr-xr-xsmarttv-client/Javascript/Main.js38
1 files changed, 30 insertions, 8 deletions
diff --git a/smarttv-client/Javascript/Main.js b/smarttv-client/Javascript/Main.js
index 241666c..e7c06ae 100755
--- a/smarttv-client/Javascript/Main.js
+++ b/smarttv-client/Javascript/Main.js
@@ -6,6 +6,7 @@ try {
widgetAPI = new Common.API.Widget();
tvKey = new Common.API.TVKeyValue();
pluginObj = new Common.API.Plugin();
+
}
catch (e) {
}
@@ -96,8 +97,9 @@ Main.onLoad = function() {
$.ajaxSetup ({
cache: false
});
+
Display.init();
- Display.selectItem(document.getElementById("selectItem1"));
+// Display.selectItem(document.getElementById("selectItem1"));
Notify.init();
Spinner.init();
Helpbar.init();
@@ -130,6 +132,8 @@ showHandler = function() {
// Called by Config, when done
Main.init = function () {
+ Main.log("Main.init()");
+
if (Config.debug == true) {
Main.logToServer = function (msg) {
if (Config.serverUrl == "" )
@@ -142,9 +146,8 @@ Main.init = function () {
}
this.state = Main.eMAIN;
+ SelectScreen.init();
- Main.log("Main.init()");
-
Buttons.init();
if ( Player.init() && Server.init() ) {
@@ -187,9 +190,14 @@ Main.init = function () {
Comm.init();
-// window.setTimeout(function() {Config.updateContext("192.168.1.142:8000"); }, (10*1000));
-
+ Main.log("ProductInfo= " + deviceapis.tv.info.getProduct());
+ Main.logToServer("ProductInfo= " + deviceapis.tv.info.getProduct());
+ Main.logToServer("isBdPlayer= " + Main.isBdPlayer());
+ Main.logToServer("TimeZone= " + deviceapis.tv.info.getTimeZone());
+// TestHandler.showMenu(20);
+
+ // window.setTimeout(function() {Config.updateContext("192.168.1.142:8000"); }, (10*1000));
// DirectAccess.show();
// Timers.init();
@@ -248,6 +256,13 @@ Main.testUrls = function () {
};
+Main.isBdPlayer = function () {
+ if (deviceapis.tv.info.getProduct() == 2) //deviceapis.tv.info.PRODUCT_TYPE_BD
+ return true;
+ else
+ return false;
+};
+
Main.changeState = function (state) {
Main.log("change state: OldState= " + this.state + " NewState= " + state);
var old_state = this.state;
@@ -843,6 +858,11 @@ cPlayStateKeyHndl.prototype.handleKeyDown = function (event) {
case tvKey.KEY_YELLOW:
Player.nextSubtitleTrack();
break;
+ case 1089:
+ case tvKey.KEY_3D:
+ case tvKey.KEY_GREEN:
+ Player.toggle3DEffectMode();
+ break;
break;
default:
Main.log("Calling Default Key Hanlder");
@@ -1121,7 +1141,9 @@ cMenuKeyHndl.prototype.handleKeyDown = function (event) {
}
break;
-
+ case tvKey.KEY_RED:
+ RecCmdHandler.showMenu(Data.getCurrentItem().childs[Main.selectedVideo].payload.guid);
+ break;
case tvKey.KEY_YELLOW:
if (Main.state == Main.eURLS) {
Buttons.ynShow();
@@ -1209,7 +1231,7 @@ cMenuKeyHndl.prototype.handleKeyDown = function (event) {
}
};
-
+/*
//---------------------------------------------------
// Select Menu Key Handler
//---------------------------------------------------
@@ -1293,7 +1315,7 @@ cSelectMenuKeyHndl.prototype.handleKeyDown = function (event) {
break;
}
};
-
+*/
//---------------------------------------------------
// Default Key Handler