1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

Add duration in embed api playbackStatusUpdate

This commit is contained in:
Chocobozzz 2020-04-08 14:51:44 +02:00
parent afd1a6ed49
commit 6ccdf9d53e
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 7 additions and 3 deletions

View file

@ -85,12 +85,14 @@ export class PeerTubeEmbedApi {
setInterval(() => {
const position = this.element.currentTime
const volume = this.element.volume
const duration = this.element.duration
this.channel.notify({
method: 'playbackStatusUpdate',
params: {
position,
volume,
duration: this.embed.player.duration(),
playbackState: currentState
}
})