aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/notification/peertube-socket.service.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-09 15:00:02 +0100
committerChocobozzz <me@florianbigard.com>2020-12-09 16:31:42 +0100
commita800dbf345e856ab790e7b3ab9a97e8c5dfa0a32 (patch)
treeb7f814ee0dae543a6f2937b9ab5154cfeff3e986 /client/src/app/core/notification/peertube-socket.service.ts
parent5cac83a78d6ba5212755fafce2ed25f7c74b04e5 (diff)
downloadPeerTube-a800dbf345e856ab790e7b3ab9a97e8c5dfa0a32.tar.gz
PeerTube-a800dbf345e856ab790e7b3ab9a97e8c5dfa0a32.tar.zst
PeerTube-a800dbf345e856ab790e7b3ab9a97e8c5dfa0a32.zip
Live views update
Diffstat (limited to 'client/src/app/core/notification/peertube-socket.service.ts')
-rw-r--r--client/src/app/core/notification/peertube-socket.service.ts7
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 () {