mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Live views update
This commit is contained in:
parent
5cac83a78d
commit
a800dbf345
9 changed files with 114 additions and 25 deletions
|
@ -69,7 +69,18 @@ class PeerTubeSocket {
|
|||
const data: LiveVideoEventPayload = { state: video.state }
|
||||
const type: LiveVideoEventType = 'state-change'
|
||||
|
||||
logger.debug('Sending video live new state notification of %s.', video.url)
|
||||
logger.debug('Sending video live new state notification of %s.', video.url, { state: video.state })
|
||||
|
||||
this.liveVideosNamespace
|
||||
.in(video.id)
|
||||
.emit(type, data)
|
||||
}
|
||||
|
||||
sendVideoViewsUpdate (video: MVideo) {
|
||||
const data: LiveVideoEventPayload = { views: video.views }
|
||||
const type: LiveVideoEventType = 'views-change'
|
||||
|
||||
logger.debug('Sending video live views update notification of %s.', video.url, { views: video.views })
|
||||
|
||||
this.liveVideosNamespace
|
||||
.in(video.id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue