diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-08 14:51:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-04-08 14:52:28 +0200 |
commit | 6ccdf9d53e4d68bcdf49bb7098c382d059988c4e (patch) | |
tree | 2f6bc3008bc9fbc8b15115827e32f5a1cf88904b /client/src/standalone/videos/embed-api.ts | |
parent | afd1a6ed49e44858848461614e2438c82e521d21 (diff) | |
download | PeerTube-6ccdf9d53e4d68bcdf49bb7098c382d059988c4e.tar.gz PeerTube-6ccdf9d53e4d68bcdf49bb7098c382d059988c4e.tar.zst PeerTube-6ccdf9d53e4d68bcdf49bb7098c382d059988c4e.zip |
Add duration in embed api playbackStatusUpdate
Diffstat (limited to 'client/src/standalone/videos/embed-api.ts')
-rw-r--r-- | client/src/standalone/videos/embed-api.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/client/src/standalone/videos/embed-api.ts b/client/src/standalone/videos/embed-api.ts index c5fbe07fa..194465d4a 100644 --- a/client/src/standalone/videos/embed-api.ts +++ b/client/src/standalone/videos/embed-api.ts | |||
@@ -85,12 +85,14 @@ export class PeerTubeEmbedApi { | |||
85 | setInterval(() => { | 85 | setInterval(() => { |
86 | const position = this.element.currentTime | 86 | const position = this.element.currentTime |
87 | const volume = this.element.volume | 87 | const volume = this.element.volume |
88 | const duration = this.element.duration | ||
88 | 89 | ||
89 | this.channel.notify({ | 90 | this.channel.notify({ |
90 | method: 'playbackStatusUpdate', | 91 | method: 'playbackStatusUpdate', |
91 | params: { | 92 | params: { |
92 | position, | 93 | position, |
93 | volume, | 94 | volume, |
95 | duration: this.embed.player.duration(), | ||
94 | playbackState: currentState | 96 | playbackState: currentState |
95 | } | 97 | } |
96 | }) | 98 | }) |