summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthlo <t.lohmar@gmx.de>2013-01-07 20:41:02 +0100
committerthlo <t.lohmar@gmx.de>2013-01-07 20:41:02 +0100
commit7034d92cbb1bf7b4c219b6ff4f744349211781dc (patch)
treed87d5151cecd205976d23d0e13a61fc7cb8a8870
parent21f592bf3c2f09f41cbc3c9c6a34ffe5d70df834 (diff)
downloadvdr-plugin-smarttvweb-7034d92cbb1bf7b4c219b6ff4f744349211781dc.tar.gz
vdr-plugin-smarttvweb-7034d92cbb1bf7b4c219b6ff4f744349211781dc.tar.bz2
Fixes (use liveChannels from Widget.conf, no error after start video,
etc).
-rwxr-xr-xsmarttv-client/Javascript/Config.js6
-rwxr-xr-xsmarttv-client/Javascript/Main.js19
-rwxr-xr-xsmarttv-client/Javascript/Player.js8
-rwxr-xr-xsmarttv-client/Javascript/Server.js6
-rwxr-xr-xsmarttv-client/config.xml2
-rwxr-xr-xsmarttv-client/index.html12
6 files changed, 31 insertions, 22 deletions
diff --git a/smarttv-client/Javascript/Config.js b/smarttv-client/Javascript/Config.js
index 8718fb5..1aa2f75 100755
--- a/smarttv-client/Javascript/Config.js
+++ b/smarttv-client/Javascript/Config.js
@@ -12,7 +12,7 @@ var Config = {
pendingBuffer: 40, // in percent
initialTimeOut: 3, // sec
skipDuration : 30, // sec
- noLiveChannels : 30,
+ liveChannels : 30,
firstLaunch : false,
deviceType : 0 // Used to differentiate between browsers and platforms
@@ -241,7 +241,7 @@ Config.processConfig = function () {
if (res != 0) this.initialTimeOut = 1.0 * res;
res = Config.getXmlValue("liveChannels");
- if (res != 0) noLiveChannels = res;
+ if (res != 0) this.liveChannels = res;
Player.skipDuration = Config.skipDuration;
Main.log("**** Config ****");
@@ -253,6 +253,8 @@ Config.processConfig = function () {
Main.log("pendingBuffer= " + Config.pendingBuffer);
Main.log("skipDuration= " + Config.skipDuration);
Main.log("initialTimeOut= " + Config.initialTimeOut);
+ Main.log("liveChannels= " + Config.liveChannels);
+
Main.log("**** /Config ****");
};
diff --git a/smarttv-client/Javascript/Main.js b/smarttv-client/Javascript/Main.js
index 3294f02..42fa8f7 100755
--- a/smarttv-client/Javascript/Main.js
+++ b/smarttv-client/Javascript/Main.js
@@ -157,13 +157,11 @@ Main.log = function (msg) {
};
Main.logToServer = function (msg) {
-// if (Config.serverUrl == "" )
-// return;
+ if (Config.serverUrl == "" )
+ return;
var XHRObj = new XMLHttpRequest();
-// XHRObj.open("POST", Config.serverUrl + "/log", true);
- XHRObj.open("POST", "http://192.168.1.122:8000/log", true);
-
+ XHRObj.open("POST", Config.serverUrl + "/log", true);
XHRObj.send("CLOG: " + msg);
};
@@ -231,6 +229,11 @@ Main.recordingsSelected = function() {
Display.show();
};
+ Server.errorCallback = function (msg) {
+ Display.showPopup(msg);
+ Main.changeState(0);
+ };
+
Player.isLive = false;
Server.setSort(true);
if (Config.format == "") {
@@ -263,7 +266,7 @@ Main.liveSelected = function() {
Player.isLive = true;
Server.setSort(false);
Server.errorCallback = Main.serverError;
- Server.fetchVideoList(Config.serverUrl + "/channels.xml"); /* Request video information from server */
+ Server.fetchVideoList(Config.serverUrl + "/channels.xml?channels="+Config.liveChannels); /* Request video information from server */
};
Main.mediaSelected = function() {
@@ -271,6 +274,10 @@ Main.mediaSelected = function() {
//
Display.show();
};
+ Server.errorCallback = function (msg) {
+ Display.showPopup(msg);
+ Main.changeState(0);
+ };
Player.isLive = false;
Server.setSort(true);
Server.fetchVideoList(Config.serverUrl + "/media.xml"); /* Request video information from server */
diff --git a/smarttv-client/Javascript/Player.js b/smarttv-client/Javascript/Player.js
index 72c6d30..c8ab787 100755
--- a/smarttv-client/Javascript/Player.js
+++ b/smarttv-client/Javascript/Player.js
@@ -178,7 +178,7 @@ Player.playVideo = function() {
this.plugin.Play( this.url );
Audio.plugin.SetSystemMute(false);
- pluginObj.setOffScreenSaver();
+ pluginObj.setOffScreenSaver();
this.pluginBD.DisplayVFD_Show(0100); // Play
}
};
@@ -192,7 +192,7 @@ Player.pauseVideo = function() {
var res = this.plugin.Pause();
if (res == false)
Display.showPopup("pause ret= " + ((res == true) ? "True" : "False"));
- pluginAPI.setOnScreenSaver();
+ pluginObj.setOnScreenSaver();
this.pluginBD.DisplayVFD_Show(0102); // Pause
};
@@ -207,7 +207,7 @@ Player.stopVideo = function() {
if (this.stopCallback) {
this.stopCallback();
}
- pluginAPI.setOnScreenSaver();
+ pluginObj.setOnScreenSaver();
this.pluginBD.DisplayVFD_Show(0101); // Stop
}
else {
@@ -223,7 +223,7 @@ Player.resumeVideo = function() {
var res = this.plugin.Resume();
if (res == false)
Display.showPopup("resume ret= " + ((res == true) ? "True" : "False"));
- pluginObj.setOffScreenSaver();
+ pluginObj.setOffScreenSaver();
this.pluginBD.DisplayVFD_Show(0100); // Play
};
diff --git a/smarttv-client/Javascript/Server.js b/smarttv-client/Javascript/Server.js
index ee23505..f24a789 100755
--- a/smarttv-client/Javascript/Server.js
+++ b/smarttv-client/Javascript/Server.js
@@ -67,10 +67,10 @@ Server.createVideoList = function() {
if (this.XHRObj.status != 200) {
Display.putInnerHTML(splashElement, "XML Server Error " + this.XHRObj.status);
- Display.status("XML Server Error " + this.XHRObj.status);
- Display.showPopup("XML Server Error " + this.XHRObj.status);
+// Display.status("XML Server Error " + this.XHRObj.status);
+// Display.showPopup("XML Server Error " + this.XHRObj.status);
if (this.errorCallback != null) {
- this.errorCallback("ServerError");
+ this.errorCallback(this.XHRObj.responseText);
}
}
else
diff --git a/smarttv-client/config.xml b/smarttv-client/config.xml
index 81588b6..821ccb7 100755
--- a/smarttv-client/config.xml
+++ b/smarttv-client/config.xml
@@ -9,7 +9,7 @@
<BigThumbIcon>Images/icon/SmartTvWeb_115.png</BigThumbIcon>
<ListIcon>Images/icon/SmartTvWeb_85.png</ListIcon>
<BigListIcon>Images/icon/SmartTvWeb_95.png</BigListIcon>
- <ver>0.83</ver>
+ <ver>0.84</ver>
<mgrver></mgrver>
<fullwidget>y</fullwidget>
<movie>y</movie>
diff --git a/smarttv-client/index.html b/smarttv-client/index.html
index f9d969c..7c37790 100755
--- a/smarttv-client/index.html
+++ b/smarttv-client/index.html
@@ -4,15 +4,17 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Vdr on SmartTV</title>
+ <script type="text/javascript" src="$MANAGER_WIDGET/Common/OpenSrc/jquery-1.4.2.min.js"></script>
+
<!-- Common widget API -->
<script type='text/javascript' language='javascript' src='$MANAGER_WIDGET/Common/API/Widget.js'></script>
- <script type='text/javascript' language='javascript' src='$MANAGER_WIDGET/Common/API/TVKeyValue.js'></script>
<script type='text/javascript' language='javascript' src='$MANAGER_WIDGET/Common/API/Plugin.js'></script>
+ <script type='text/javascript' language='javascript' src='$MANAGER_WIDGET/Common/API/TVKeyValue.js'></script>
<script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/Common/webapi/1.0/serviceapis.js"></script>
<script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/Common/webapi/1.0/deviceapis.js"></script>
- <script language="javascript" type="text/javascript" src="$MANAGER_WIDGET/Common/Util/Include.js"></script>
- <script language="javascript" type="text/javascript" src="$MANAGER_WIDGET/Common/Util/Language.js"></script>
+ <script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/Common/Util/Include.js"></script>
+ <script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/Common/Util/Language.js"></script>
<script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/Common/Plugin/Define.js"></script>
<!-- Widget code -->
@@ -46,10 +48,8 @@
</head>
<body onload="Main.onLoad();" onunload="Main.onUnload();">
- <script type="text/javascript" src="$MANAGER_WIDGET/Common/OpenSrc/jquery-1.4.2.min.js"></script>
<script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/Common/IME_XT9/ime.js"></script>
- <script type="text/javascript" src="$MANAGER_WIDGET/Common/IME_XT9/inputCommon/ime_input.js"></script>
- <script language="javascript" type="text/javascript" src="Javascript/Options.js"></script>
+ <script language="javascript" type="text/javascript" src="Javascript/Options.js"></script>
<!-- Dummy anchor as focus for key events -->
<a href='javascript:void(0);' id='anchor' onkeydown='Main.keyDown();'></a>