1
0
Fork 0
peertube/shared/extra-utils/socket/socket-io.ts
2020-11-19 09:07:20 +01:00

18 lines
449 B
TypeScript

import { io } from 'socket.io-client'
function getUserNotificationSocket (serverUrl: string, accessToken: string) {
return io(serverUrl + '/user-notifications', {
query: { accessToken }
})
}
function getLiveNotificationSocket (serverUrl: string) {
return io(serverUrl + '/live-videos')
}
// ---------------------------------------------------------------------------
export {
getUserNotificationSocket,
getLiveNotificationSocket
}