]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/socket/socket-io.ts
Use dns cache for requests
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / socket / socket-io.ts
index 854ab71af1b19b8692399204289f781538a1a680..4ca93f453ed241020b9a9e199996813a865af595 100644 (file)
@@ -1,4 +1,4 @@
-import * as io from 'socket.io-client'
+import { io } from 'socket.io-client'
 
 function getUserNotificationSocket (serverUrl: string, accessToken: string) {
   return io(serverUrl + '/user-notifications', {
@@ -6,8 +6,13 @@ function getUserNotificationSocket (serverUrl: string, accessToken: string) {
   })
 }
 
+function getLiveNotificationSocket (serverUrl: string) {
+  return io(serverUrl + '/live-videos')
+}
+
 // ---------------------------------------------------------------------------
 
 export {
-  getUserNotificationSocket
+  getUserNotificationSocket,
+  getLiveNotificationSocket
 }