diff options
-rw-r--r-- | server/lib/peertube-socket.ts | 4 | ||||
-rw-r--r-- | shared/models/videos/live/live-video-event-payload.model.ts | 3 |
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 @@ | |||
1 | import { Server as HTTPServer } from 'http' | 1 | import { Server as HTTPServer } from 'http' |
2 | import { Namespace, Server as SocketServer, Socket } from 'socket.io' | 2 | import { Namespace, Server as SocketServer, Socket } from 'socket.io' |
3 | import { isIdValid } from '@server/helpers/custom-validators/misc' | 3 | import { isIdValid } from '@server/helpers/custom-validators/misc' |
4 | import { Debounce } from '@server/helpers/debounce' | ||
4 | import { MVideo, MVideoImmutable } from '@server/types/models' | 5 | import { MVideo, MVideoImmutable } from '@server/types/models' |
5 | import { MRunner } from '@server/types/models/runners' | 6 | import { MRunner } from '@server/types/models/runners' |
6 | import { UserNotificationModelForApi } from '@server/types/models/user' | 7 | import { UserNotificationModelForApi } from '@server/types/models/user' |
7 | import { LiveVideoEventPayload, LiveVideoEventType } from '@shared/models' | 8 | import { LiveVideoEventPayload, LiveVideoEventType } from '@shared/models' |
8 | import { logger } from '../helpers/logger' | 9 | import { logger } from '../helpers/logger' |
9 | import { authenticateRunnerSocket, authenticateSocket } from '../middlewares' | 10 | import { authenticateRunnerSocket, authenticateSocket } from '../middlewares' |
10 | import { Debounce } from '@server/helpers/debounce' | ||
11 | 11 | ||
12 | class PeerTubeSocket { | 12 | class 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' | |||
3 | export interface LiveVideoEventPayload { | 3 | export 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 | } |