From 1a5f318ae78eef98c951b15d9f7fd4279f1a6265 Mon Sep 17 00:00:00 2001 From: janus_wel Date: Sat, 1 Nov 2008 15:39:18 +0000 Subject: 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 --- nicontroller.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'nicontroller.js') 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 - * @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() { -- cgit v1.2.3