Fix socket io lazy loading

pull/5067/head
Chocobozzz 2022-06-13 13:55:05 +02:00
parent 22f375f37d
commit 85cfe29be6
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import { Subject } from 'rxjs' import { Subject } from 'rxjs'
import { io, Socket } from 'socket.io-client' import { ManagerOptions, Socket, SocketOptions } from 'socket.io-client'
import { Injectable } from '@angular/core' import { Injectable } from '@angular/core'
import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models' import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models'
import { environment } from '../../../environments/environment' import { environment } from '../../../environments/environment'
@ -9,7 +9,7 @@ export type NotificationEvent = 'new' | 'read' | 'read-all'
@Injectable() @Injectable()
export class PeerTubeSocket { export class PeerTubeSocket {
private io: typeof io private io: (uri: string, opts?: Partial<ManagerOptions & SocketOptions>) => Socket
private notificationSubject = new Subject<{ type: NotificationEvent, notification?: UserNotificationServer }>() private notificationSubject = new Subject<{ type: NotificationEvent, notification?: UserNotificationServer }>()
private liveVideosSubject = new Subject<{ type: LiveVideoEventType, payload: LiveVideoEventPayload }>() private liveVideosSubject = new Subject<{ type: LiveVideoEventType, payload: LiveVideoEventPayload }>()