+function buildSocketHelpers () {
+ return {
+ sendNotification: (userId: number, notification: UserNotificationModelForApi) => {
+ PeerTubeSocket.Instance.sendNotification(userId, notification)
+ },
+ sendVideoLiveNewState: (video: MVideo) => {
+ PeerTubeSocket.Instance.sendVideoLiveNewState(video)
+ }
+ }
+}
+