Remove deprecated "views" from live video event
This commit is contained in:
parent
982edf32ae
commit
257df4cb56
2 changed files with 2 additions and 5 deletions
|
@ -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 })
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue