diff options
Diffstat (limited to 'client/src/app/core')
-rw-r--r-- | client/src/app/core/notification/peertube-socket.service.ts | 7 |
1 files changed, 5 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 7e1c43364..089276cfc 100644 --- a/client/src/app/core/notification/peertube-socket.service.ts +++ b/client/src/app/core/notification/peertube-socket.service.ts | |||
@@ -73,8 +73,11 @@ export class PeerTubeSocket { | |||
73 | this.liveVideosSocket = this.io(environment.apiUrl + '/live-videos') | 73 | this.liveVideosSocket = this.io(environment.apiUrl + '/live-videos') |
74 | }) | 74 | }) |
75 | 75 | ||
76 | const type: LiveVideoEventType = 'state-change' | 76 | const types: LiveVideoEventType[] = [ 'views-change', 'state-change' ] |
77 | this.liveVideosSocket.on(type, (payload: LiveVideoEventPayload) => this.dispatchLiveVideoEvent(type, payload)) | 77 | |
78 | for (const type of types) { | ||
79 | this.liveVideosSocket.on(type, (payload: LiveVideoEventPayload) => this.dispatchLiveVideoEvent(type, payload)) | ||
80 | } | ||
78 | } | 81 | } |
79 | 82 | ||
80 | private async importIOIfNeeded () { | 83 | private async importIOIfNeeded () { |