diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-13 13:55:05 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-13 13:55:05 +0200 |
commit | 85cfe29be65b34ae816bcecf5413c2655a3b76f3 (patch) | |
tree | a9992de28ad81d2c3a6f23ae7f7e69e5b4fce849 /client/src | |
parent | 22f375f37d0455e5945f62659c580ef430c36601 (diff) | |
download | PeerTube-85cfe29be65b34ae816bcecf5413c2655a3b76f3.tar.gz PeerTube-85cfe29be65b34ae816bcecf5413c2655a3b76f3.tar.zst PeerTube-85cfe29be65b34ae816bcecf5413c2655a3b76f3.zip |
Fix socket io lazy loading
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/core/notification/peertube-socket.service.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/app/core/notification/peertube-socket.service.ts b/client/src/app/core/notification/peertube-socket.service.ts index 0db86d8e7..50a11e948 100644 --- a/client/src/app/core/notification/peertube-socket.service.ts +++ b/client/src/app/core/notification/peertube-socket.service.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Subject } from 'rxjs' | 1 | import { Subject } from 'rxjs' |
2 | import { io, Socket } from 'socket.io-client' | 2 | import { ManagerOptions, Socket, SocketOptions } from 'socket.io-client' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models' | 4 | import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models' |
5 | import { environment } from '../../../environments/environment' | 5 | import { environment } from '../../../environments/environment' |
@@ -9,7 +9,7 @@ export type NotificationEvent = 'new' | 'read' | 'read-all' | |||
9 | 9 | ||
10 | @Injectable() | 10 | @Injectable() |
11 | export class PeerTubeSocket { | 11 | export class PeerTubeSocket { |
12 | private io: typeof io | 12 | private io: (uri: string, opts?: Partial<ManagerOptions & SocketOptions>) => Socket |
13 | 13 | ||
14 | private notificationSubject = new Subject<{ type: NotificationEvent, notification?: UserNotificationServer }>() | 14 | private notificationSubject = new Subject<{ type: NotificationEvent, notification?: UserNotificationServer }>() |
15 | private liveVideosSubject = new Subject<{ type: LiveVideoEventType, payload: LiveVideoEventPayload }>() | 15 | private liveVideosSubject = new Subject<{ type: LiveVideoEventType, payload: LiveVideoEventPayload }>() |