aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/lib/peertube-socket.ts4
-rw-r--r--shared/models/videos/live/live-video-event-payload.model.ts3
2 files changed, 2 insertions, 5 deletions
diff --git a/server/lib/peertube-socket.ts b/server/lib/peertube-socket.ts
index ded7e9743..3e41a2def 100644
--- a/server/lib/peertube-socket.ts
+++ b/server/lib/peertube-socket.ts
@@ -1,13 +1,13 @@
1import { Server as HTTPServer } from 'http' 1import { Server as HTTPServer } from 'http'
2import { Namespace, Server as SocketServer, Socket } from 'socket.io' 2import { Namespace, Server as SocketServer, Socket } from 'socket.io'
3import { isIdValid } from '@server/helpers/custom-validators/misc' 3import { isIdValid } from '@server/helpers/custom-validators/misc'
4import { Debounce } from '@server/helpers/debounce'
4import { MVideo, MVideoImmutable } from '@server/types/models' 5import { MVideo, MVideoImmutable } from '@server/types/models'
5import { MRunner } from '@server/types/models/runners' 6import { MRunner } from '@server/types/models/runners'
6import { UserNotificationModelForApi } from '@server/types/models/user' 7import { UserNotificationModelForApi } from '@server/types/models/user'
7import { LiveVideoEventPayload, LiveVideoEventType } from '@shared/models' 8import { LiveVideoEventPayload, LiveVideoEventType } from '@shared/models'
8import { logger } from '../helpers/logger' 9import { logger } from '../helpers/logger'
9import { authenticateRunnerSocket, authenticateSocket } from '../middlewares' 10import { authenticateRunnerSocket, authenticateSocket } from '../middlewares'
10import { Debounce } from '@server/helpers/debounce'
11 11
12class PeerTubeSocket { 12class PeerTubeSocket {
13 13
@@ -98,7 +98,7 @@ class PeerTubeSocket {
98 } 98 }
99 99
100 sendVideoViewsUpdate (video: MVideoImmutable, numViewers: number) { 100 sendVideoViewsUpdate (video: MVideoImmutable, numViewers: number) {
101 const data: LiveVideoEventPayload = { viewers: numViewers, views: numViewers } 101 const data: LiveVideoEventPayload = { viewers: numViewers }
102 const type: LiveVideoEventType = 'views-change' 102 const type: LiveVideoEventType = 'views-change'
103 103
104 logger.debug('Sending video live views update notification of %s.', video.url, { viewers: numViewers }) 104 logger.debug('Sending video live views update notification of %s.', video.url, { viewers: numViewers })
diff --git a/shared/models/videos/live/live-video-event-payload.model.ts b/shared/models/videos/live/live-video-event-payload.model.ts
index 1a9ac512c..646856ac3 100644
--- a/shared/models/videos/live/live-video-event-payload.model.ts
+++ b/shared/models/videos/live/live-video-event-payload.model.ts
@@ -3,8 +3,5 @@ import { VideoState } from '../video-state.enum'
3export interface LiveVideoEventPayload { 3export interface LiveVideoEventPayload {
4 state?: VideoState 4 state?: VideoState
5 5
6 // FIXME: deprecated in 4.0 in favour of viewers
7 views?: number
8
9 viewers?: number 6 viewers?: number
10} 7}