1
0
Fork 0

Remove deprecated "views" from live video event

This commit is contained in:
Chocobozzz 2023-07-28 16:35:27 +02:00
parent 982edf32ae
commit 257df4cb56
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 2 additions and 5 deletions

View file

@ -1,13 +1,13 @@
import { Server as HTTPServer } from 'http'
import { Namespace, Server as SocketServer, Socket } from 'socket.io'
import { isIdValid } from '@server/helpers/custom-validators/misc'
import { Debounce } from '@server/helpers/debounce'
import { MVideo, MVideoImmutable } from '@server/types/models'
import { MRunner } from '@server/types/models/runners'
import { UserNotificationModelForApi } from '@server/types/models/user'
import { LiveVideoEventPayload, LiveVideoEventType } from '@shared/models'
import { logger } from '../helpers/logger'
import { authenticateRunnerSocket, authenticateSocket } from '../middlewares'
import { Debounce } from '@server/helpers/debounce'
class PeerTubeSocket {
@ -98,7 +98,7 @@ class PeerTubeSocket {
}
sendVideoViewsUpdate (video: MVideoImmutable, numViewers: number) {
const data: LiveVideoEventPayload = { viewers: numViewers, views: numViewers }
const data: LiveVideoEventPayload = { viewers: numViewers }
const type: LiveVideoEventType = 'views-change'
logger.debug('Sending video live views update notification of %s.', video.url, { viewers: numViewers })

View file

@ -3,8 +3,5 @@ import { VideoState } from '../video-state.enum'
export interface LiveVideoEventPayload {
state?: VideoState
// FIXME: deprecated in 4.0 in favour of viewers
views?: number
viewers?: number
}