aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-plugin.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-13 14:18:58 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-03-18 11:17:59 +0100
commite2f01c47e08d26a30ad47068d195b3d21d0df8a1 (patch)
tree21f18ed462d313bfb4ba7a1b5221fdb6b2c35bc1 /client/src/assets/player/peertube-plugin.ts
parent15e9d5ca39e0b792f61453fbf3885a0fc446afa7 (diff)
downloadPeerTube-e2f01c47e08d26a30ad47068d195b3d21d0df8a1.tar.gz
PeerTube-e2f01c47e08d26a30ad47068d195b3d21d0df8a1.tar.zst
PeerTube-e2f01c47e08d26a30ad47068d195b3d21d0df8a1.zip
Playlist support in watch page
Diffstat (limited to 'client/src/assets/player/peertube-plugin.ts')
-rw-r--r--client/src/assets/player/peertube-plugin.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/assets/player/peertube-plugin.ts b/client/src/assets/player/peertube-plugin.ts
index 3991e4627..dd9408c8e 100644
--- a/client/src/assets/player/peertube-plugin.ts
+++ b/client/src/assets/player/peertube-plugin.ts
@@ -83,9 +83,15 @@ class PeerTubePlugin extends Plugin {
83 83
84 if (options.stopTime) { 84 if (options.stopTime) {
85 const stopTime = timeToInt(options.stopTime) 85 const stopTime = timeToInt(options.stopTime)
86 const self = this
86 87
87 this.player.on('timeupdate', () => { 88 this.player.on('timeupdate', function onTimeUpdate () {
88 if (this.player.currentTime() > stopTime) this.player.pause() 89 if (self.player.currentTime() > stopTime) {
90 self.player.pause()
91 self.player.trigger('stopped')
92
93 self.player.off('timeupdate', onTimeUpdate)
94 }
89 }) 95 })
90 } 96 }
91 97