aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nicontroller.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/nicontroller.js b/nicontroller.js
index 7db69b4..77a4305 100644
--- a/nicontroller.js
+++ b/nicontroller.js
@@ -360,7 +360,10 @@ NicoPlayerController.prototype = {
else position = this.constants.SEEKTO_DEFAULT;
var p = this._flvplayer();
- p.ext_setPlayheadTime(position);
+ if (position < 0)
+ p.ext_setPlayheadTime(parseInt(p.ext_getTotalTime()) + parseInt(position));
+ else
+ p.ext_setPlayheadTime(position);
},
seekBy: function(delta) {