aboutsummaryrefslogtreecommitdiffstats
path: root/nicontroller.js
diff options
context:
space:
mode:
authorjanus_wel2008-11-01 15:39:18 +0000
committerjanus_wel2008-11-01 15:39:18 +0000
commit1a5f318ae78eef98c951b15d9f7fd4279f1a6265 (patch)
treebdef1bde879ba421990b42d6282415b30900131c /nicontroller.js
parentdb76cc7522151b707bd016440ea9551058d56ae6 (diff)
downloadvimperator-plugins-1a5f318ae78eef98c951b15d9f7fd4279f1a6265.tar.bz2
patch to avoid flvplayer's bug, when repeat mode on.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@22529 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'nicontroller.js')
-rw-r--r--nicontroller.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/nicontroller.js b/nicontroller.js
index aaa4275..c1ed0ad 100644
--- a/nicontroller.js
+++ b/nicontroller.js
@@ -4,7 +4,7 @@
* @description this script give you keyboard opration for nicovideo.jp.
* @description-ja ニコニコ動画のプレーヤーをキーボードで操作できるようにする。
* @author janus_wel <janus_wel@fb3.so-net.ne.jp>
- * @version 0.53
+ * @version 0.54
* @minversion 2.0pre 2008/10/16
* ==VimperatorPlugin==
*
@@ -280,6 +280,16 @@ NicoPlayerController.prototype = {
(p.ext_getStatus() !== this.constants.STATE_PLAYING)
? p.ext_play(this.constants.PLAY)
: p.ext_play(this.constants.PAUSE);
+
+ if (p.ext_getStatus() === 'end') {
+ var base = p.ext_getPlayheadTime();
+ var self = this;
+ setTimeout(function () {
+ base !== p.ext_getPlayheadTime()
+ ? p.ext_play(self.constants.PAUSE)
+ : p.ext_play(self.constants.PLAY);
+ }, 100);
+ }
},
toggleMute: function() {