aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-13 13:55:05 +0200
committerChocobozzz <me@florianbigard.com>2022-06-13 13:55:05 +0200
commit85cfe29be65b34ae816bcecf5413c2655a3b76f3 (patch)
treea9992de28ad81d2c3a6f23ae7f7e69e5b4fce849 /client/src/app/core
parent22f375f37d0455e5945f62659c580ef430c36601 (diff)
downloadPeerTube-85cfe29be65b34ae816bcecf5413c2655a3b76f3.tar.gz
PeerTube-85cfe29be65b34ae816bcecf5413c2655a3b76f3.tar.zst
PeerTube-85cfe29be65b34ae816bcecf5413c2655a3b76f3.zip
Fix socket io lazy loading
Diffstat (limited to 'client/src/app/core')
-rw-r--r--client/src/app/core/notification/peertube-socket.service.ts4
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 @@
1import { Subject } from 'rxjs' 1import { Subject } from 'rxjs'
2import { io, Socket } from 'socket.io-client' 2import { ManagerOptions, Socket, SocketOptions } from 'socket.io-client'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models' 4import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models'
5import { environment } from '../../../environments/environment' 5import { environment } from '../../../environments/environment'
@@ -9,7 +9,7 @@ export type NotificationEvent = 'new' | 'read' | 'read-all'
9 9
10@Injectable() 10@Injectable()
11export class PeerTubeSocket { 11export 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 }>()