aboutsummaryrefslogtreecommitdiffstats
path: root/nicontroller.js
diff options
context:
space:
mode:
Diffstat (limited to 'nicontroller.js')
-rw-r--r--nicontroller.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/nicontroller.js b/nicontroller.js
index 6e35cf6..e618bb5 100644
--- a/nicontroller.js
+++ b/nicontroller.js
@@ -285,9 +285,12 @@ NicoPlayerController.prototype = {
let base = p.ext_getPlayheadTime();
let self = this;
setTimeout(function () {
- base !== p.ext_getPlayheadTime()
- ? p.ext_play(self.constants.PAUSE)
- : p.ext_play(self.constants.PLAY);
+ if (base !== p.ext_getPlayheadTime()) {
+ p.ext_play(self.constants.PAUSE);
+ } else {
+ p.ext_setPlayheadTime(0);
+ p.ext_play(self.constants.PLAY);
+ }
}, 100);
}
},