From a800dbf345e856ab790e7b3ab9a97e8c5dfa0a32 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 9 Dec 2020 15:00:02 +0100 Subject: Live views update --- client/src/app/core/notification/peertube-socket.service.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client/src/app/core') 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 { this.liveVideosSocket = this.io(environment.apiUrl + '/live-videos') }) - const type: LiveVideoEventType = 'state-change' - this.liveVideosSocket.on(type, (payload: LiveVideoEventPayload) => this.dispatchLiveVideoEvent(type, payload)) + const types: LiveVideoEventType[] = [ 'views-change', 'state-change' ] + + for (const type of types) { + this.liveVideosSocket.on(type, (payload: LiveVideoEventPayload) => this.dispatchLiveVideoEvent(type, payload)) + } } private async importIOIfNeeded () { -- cgit v1.2.3