summaryrefslogtreecommitdiff
path: root/smarttv-client/Javascript/Player.js
diff options
context:
space:
mode:
authorthlo <t.lohmar@gmx.de>2013-01-21 22:11:22 +0100
committerthlo <t.lohmar@gmx.de>2013-01-21 22:11:22 +0100
commitcc89fe7809bc40882a3f89e6b9a35e943b868e8a (patch)
treebc3aaf90d32a8189d71069e81da54965e03577aa /smarttv-client/Javascript/Player.js
parentc5ecb493d35373673004e5c6d84b8dff4f379eef (diff)
downloadvdr-plugin-smarttvweb-cc89fe7809bc40882a3f89e6b9a35e943b868e8a.tar.gz
vdr-plugin-smarttvweb-cc89fe7809bc40882a3f89e6b9a35e943b868e8a.tar.bz2
Resume Support, Handle long file names, helpbar fix.
Diffstat (limited to 'smarttv-client/Javascript/Player.js')
-rwxr-xr-xsmarttv-client/Javascript/Player.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/smarttv-client/Javascript/Player.js b/smarttv-client/Javascript/Player.js
index 3a677e0..9d9c1e0 100755
--- a/smarttv-client/Javascript/Player.js
+++ b/smarttv-client/Javascript/Player.js
@@ -11,9 +11,11 @@ var Player =
isRecording : false,
url : "",
+ guid : "unknown",
startTime : 0,
duration : 0,
-
+
+ resumePos : -1,
state : 0,
cptOffset : 0, // millis
curPlayTime : 0, // millis
@@ -146,13 +148,14 @@ Player.setVideoURL = function(url) {
Main.log("URL = " + this.url);
};
+
Player.setCurrentPlayTimeOffset = function(val) {
// val in milli sec
this.cptOffset = val;
// Display.showPopup("CurrentPlayTimeOffset= " + this.cptOffset);
};
-Player.playVideo = function() {
+Player.playVideo = function(resume_pos) {
if (Config.deviceType != 0) {
Display.showPopup ("Only supported for TVs");
return;
@@ -161,7 +164,6 @@ Player.playVideo = function() {
Main.log("No videos to play");
}
else {
-
Player.bufferState = 0;
Display.bufferUpdate();
@@ -180,8 +182,11 @@ Player.playVideo = function() {
Player.skipDuration = Config.skipDuration; // reset
Main.log ("StartPlayback for " + this.url);
-
- this.plugin.Play( this.url );
+
+ if (resume_pos == -1)
+ this.plugin.Play( this.url );
+ else
+ this.plugin.ResumePlay(this.url, resume_pos);
Audio.plugin.SetSystemMute(false);
pluginObj.setOffScreenSaver();
this.pluginBD.DisplayVFD_Show(0100); // Play